It depends on the type of credit cards and banks that issue them. Some banks only allow you to earn points from certain categories while others allow you to earn from all spending but at lower reward multiplier.
Before you choose a rewards credit card, you need to know the categories of spend you are entitled to earn rewards points in order to get the most out of your credit card.