I used to teach a course in math for food service. So, here are the customs as I understand them. Sit down restaurant, the norm is 15%, unless it is added to the bill. You can, and should, make it more or less depending on the service. 30% is occasional for GREAT service. Leaving two or three pennies is a statement that you hated the service. Buffet with some table service (drink refills) is 5-10%, but some do not do so. Carry out food is nothing (except recreational food - see below). If you leave nothing, it will be assumed that you are a foreigner, and do not know the customs.
There is a code for tipping bellboys in hotels; I know nothing of that.
These are the only two classes of people who depend on tips for their living. The income tax law even expects them to pay tax on tips whether they get them or not. These are also the only two places where it is impolite not to tip.
Many people can be tipped. Fast food vendors at the beach have "tip jars" on the counter. Use it as you choose. Anyone offering recreational personal services, like massages, manicures, taxi drivers, dog walking, you name it, you tip as you choose, and it makes a statement "I really like the way you do things." My wife used to tip the guy who serviced the central heating unit in our apartment who was paid in bulk by the landlord. She argued it gives good service next time. Some places actually have "no tipping" signs up, so powerful has the custom become.
A famous piece of folklore: We have a number of characters, like "Diamond Jim Brady" who as I remember, tipped everyone for everything. That behavior is part of bios of certain famous persons.