Your character either has the feat or does not. Each character gets one feat at 1st level. At 3rd level, and every three levels thereafter, they gain an additional feat. For multi-classed characters, feats come according to total character level, regardless of individual class levels. Additionally, certain races and classes gain additional or special feats.
Some feats have prerequisites.
You must have the listed ability score, feat, skill, level or base attack bonus in order to select or use that feat. A character can however gain a feat at the same time as which they gain the prerequisite. You can't use the feat if you've lost the prerequisite. For example, if you strength drops below 13 from a magical attack, even if you know the Power Attack feat, you can't use it. Does not provoke Attacks of Opportunity.