Some penalties come from a bad shot. These four come from not checking, and every one of them can be avoided on the first tee.
What "the general penalty" means
You will hear this phrase often. The general penalty is two strokes in stroke play and loss of the hole in match play.
Playing a wrong ball
Hit a ball that is not yours and you get the general penalty. In stroke play the strokes you made with the wrong ball do not count, and you must go back and play your own. If you tee off on the next hole without putting it right, you are disqualified. Put your own mark on your ball with a pen, and look for it before every shot.
More than fourteen clubs
You may carry fourteen clubs and no more. In stroke play the penalty is two strokes for each hole you played with too many, up to four strokes for the round. In match play one hole is taken off your score in the match for each hole, up to two. As soon as you notice, take the extra club out of play. Count your clubs before you tee off.
Advice
During a round you must not give advice to another player in the competition, and you must not ask anyone except your caddie for it. Advice is anything meant to help with choosing a club, making a stroke or deciding how to play a hole. Distances, where a bunker is and what the rules say are public information: anyone may share them. Breaking this rule is the general penalty.
Slow play
The rules recommend playing your shot within 40 seconds of being able to. Holding the course up without good reason is unreasonable delay: one penalty stroke the first time, the general penalty the second and disqualification the third.
Calling it on yourself
Golf has no referee following every group. You are expected to know when you have broken a rule and to add the penalty yourself. Knowing you have a penalty and leaving it off is disqualification, and so is agreeing with another player to ignore a rule.
In the rule book: Rules 1, 4, 5, 6 and 10.