Play the ball as it lies, play the course as you find it, and if you cannot do either, do what is fair.
(The central principle of golf, taken from the rule book of The Royal and Ancient Golf Club of St. Andrews)
But to do what is fair, you need to know the Rules of Golf.
Click here to download a quick summary rule book published by the PGA.
If you prefer to read and research the full spectrum of USGA rules for golf, click here to go to their website, USGA.org (These rules govern play in the USA and Mexico.)
For the rules for golf for the rest of world click here for the official R&A website.