Basically they have a contract to use their product and endorse their product. It depends on the contract you sign; to what degree you wear or use their product. Take the case of Rickie Fowler who recently signed with Titleist/Puma. For his contract with Titleist, he plays their clubs, uses their bag, and has to have their logo on his hats but uses Puma for everything else. Then look at Sergio Garcia and his deal with Taylormade/Adidas, he is head to toe Adidas and all TM in the bag.
The long and short of it is they are walking billboards for the company they decide to sign to, they advertise for the companies by showing their product and in return they get free equipment and get paid for their service.
Hope this helps.