Before a player takes a practice swing or actually hits the ball, he should be sure that no other player will be hit by the club or affected negatively in any way as a result of his actions. Furthermore, a player should not hit a golf ball until the players in front of him are in no danger of being hit. And, if a golfer is about to hit a shot that could endanger someone else, it is his responsibility to warn those before he hits the shot. Finally, if a player hits a wayward shot that could result in harming another person, he should yell "fore" so the person can try to avoid being hit.
Being a good steward of the golf course for those behind you is a large part of the etiquette that should be a part of your golf game. For example, if you hit from a sand trap, you should rake it smooth if there is a rake close at hand. Otherwise, use your golf club to do the best you can. In addition, if you take a divot in the fairway, you should replace it. When you reach the green, you should fix the ball marks there, even if they aren't your own, and be careful not to damage the cup with the flagstick if it's your job to remove or replace it.
Don't Slow Play
Unlike most sports, if you play an 18-hole round of golf, it will take at least four hours to complete, and sometimes a lot longer when the course is very busy. So it's incumbent on you to keep pace with your round without rushing your shots. For instance, be ready to play when it's your turn. On those occasions when you hit your ball into an area that may be out of bounds or difficult to find, hit what is known as a "provisional" ball, so you will not have to return later to hit another ball, thus slowing up play. If you have difficulty finding your ball, realize that you have five minutes to do so. And, if for any reason the hole in front of you is clear, you should wave the group behind you to play through.