You must be a 7th-level character or higher to have it, and it is based on Charisma and other factors.
Here is the Leadership feat
Basically, you start with your character level, and add your Charisma mod. (There are other factors too after the link.) The number you get is the level of your Cohort. Your Cohort cannot have a level that is more than two levels less than yours. (So if you are 7th level, your Cohort cannot be above 5th level.)
Your Cohort begins with an amount of gold appropriate for his or her level. After that, you and your Cohort can divide treasure however you like.