Intellectual Property is a tricky matter. Lots of lawsuits every year simply because people are either mistaken about their rights or confused. Or both.
When you work for a boss the situation is clear-cut, you are employed, they own the product of your work.
When you work as a free-lancer the situation is much less clear cut. If you work for hourly rates and your work is ‘transient’, in other words you do not create a product such as a book, a piece of software or a design then there is no issue. But if you do create a product that could be considered ‘intellectual property’ the rights situation depends on many factors, amongst others the contract you have with your customer, the country you work in and the kind of work.
Because of the nature of the issues here I’m making an exception in providing a couple of examples that are tied to a specific profession.
If you are the author of a piece of software for instance, and your customer asks you to make a modification and they pay you for the software license and the modification, they technically do not own the modification, you could turn around tomorrow morning and sell it to one of their competitors.
The best way to deal with this is to make absolutely sure that both parties are aware of the rights situation in order to avoid future trouble (see ‘conflict’). Some rights you can not opt out of, even under contractual law. For instance, if you are the writer of something you have an inalienable right to be identified as such. That doesn’t mean you can’t contractually assign copyright to some other party. It just means that you will be able to identify yourself with the work that you have produced.
If you are an artist that produces images (digital imagery, paintings, photographs) similar rights exist. This is good because it allows you to show your work in a portfolio, even after you sell the work. This is an absolute must for anybody that is in a graphical profession, your portfolio is the route to getting new customers, the first thing they will ask is to see your portfolio.
Copyright is a tricky thing, assuming that you have created something the copyright is automatically (in most jurisdictions) assigned to you, the creator. If you want you can make it more explicit by registering your copyright, but in general this is not required, the mere act of creation establishes copyright.
In order to pass your work over to someone else, you re-assign copyright. You have to do that on a per-work basis, describe the work to make the transfer explicit.
In your pricing you have the option to reflect the rights transfer, for instance, if you write a piece of software for a single customer but you see that there is a larger market for that piece of software, you might contractually reserve the rights to be yours in spite of being paid for the work. You simply charge somewhat less than you would normally charge, you can then - sometimes after a hold back period, or a geographical restriction - approach competitors of your original customer.
This is a great way to get in on license business, which is one step up in terms of remuneration for effort compared to working per hour or working per job.