There are two basic kinds of cash-back credit cards:
Flat-rate cards pay the same cash-back rate no matter what you buy. Flat-rate cards typically pay 1.5% to 2% on everything.
Bonus category cards pay higher rates (as much as 5% or 6%) at specific types of merchants, such as grocery stores or restaurants, and a lower rate (usually 1%) everywhere else.
Bonus categories themselves come in different flavors. On a lot of cards, the bonus categories never change. For example, you might always earn 3% at restaurants or 5% at gas stations. Some cards have rotating categories that change every three months, and you need to "activate" the categories online to qualify for the higher rate. And some cards have customizable bonus categories — you can choose which purchases earn higher rewards, or the card automatically adjusts to give you higher rewards in the category where you spend the most money.
It's common (though by no means universal) for bonus category cards to cap the amount of spending that qualifies for their highest rates; once you hit the cap, any spending in those categories reverts to the card's lower "everywhere else" rate. In general, cash back cards don't limit the total amount of cash back you can earn, although there are some exceptions.