Software is a type of intellectual property and is protected by copyright law. As such, when you buy software, it usually comes with a software licence.
This is an agreement between the software developer or publisher (ie the copyright owner) and you (ie the end-user), which grants you permission to use or distribute the software. It usually includes terms on how the software can and can’t be used and its duration. Some may also include who can use the software eg home users or businesses.
Without a licence, your use of the software constitutes a breach of the developer’s rights.