Intellectual Property Copyright law protects the expression of an idea, such as source code or an article. Patents protect the idea itself. You may reimplement a product without infringing on a copyright. You can infringe a patent, even if you've implemented an algorithm from scratch, without having heard of it. Patents are potentially big trouble for small software shops, because a proper patent search costs more than you are likely to make.
Trade secrets form a large part of the software world.
You will often be asked to sign a nondisclosure agreement before working for a customer. These agreements prevent you from freely using anything you might learn about the customer or its business. They are normal. If the customer won't drop those provisions, don't take the contract. Data, and particularly databases, have emerged as an important property category.