The best way to sound good is to keep your guitar perfectly in tune. That's not hard to do these days, with the huge range of cheap electronic tuners on the market.
There are a couple of meanings to the word "fret":
1) The actual little bits of metal wire embedded in the neck are frets, and 2) the distances between notes on the same string are referred to in frets, as in: 'Three frets up" or five frets down'.
When talking about music and the guitar, the terms — "up" and "down", " top" and" bottom", " low" and "high", " above" and "below" — should refer to pitch. Many beginners call their bass strings the 'top' strings because they're higher off the floor than the treble strings, but this can be confusing. The top strings are the thin ones, where the notes are higher in pitch. So, for example, 'up the neck' means toward the body of the guitar, where the notes get higher in pitch.
There are six strings on a guitar, named after the notes they are tuned to. From bass to treble (thick to thin) they are:E, A, D, G, B and another E. They are also numbered 1, 2, 3, 4, 5 and 6, from thin to thick.
The diagram on the left illustrates the relationship each string has to its neighbour(s).
The A string is tuned to the note made when you play the fifth fret of the e string, in other words, the A string takes over from the E string at the fifth fret. (Watch the movie on this page to see what I mean by that.)
The D string also follows this fifth fret rule; it takes over from the A string at the fifth fret.
The G string also follows the rule, taking over from the D string at the fifth fret.
The B string breaks the rule! It is tuned to the fourth fret of the G string. (This kink in the tuning, as you will later find out, is what makes the guitar such a rich source of musical possibilities, but also what makes it so difficult to decipher.)
Lastly, the thin E string follows the rule again — it takes over from the B string at the fifth fret.
As long as the strings on your guitar are tuned in the relationship shown here, it will be in tune. You'll be able to play chord shapes and it will sound right. If you don't have a tuner or reference note, tune your thick e string up until it stops rattling and buzzing and starts to ring nicely. Don't apply more tension than you need to do that. Then start tuning up the other strings following the diagram to the left. You'll probably need to adjust each string several times before they all settle in. Unless you're very lucky, however, you won't be able to play along to a piano or any other instrument with fixed tuning. To do that, you need to be in concert pitch.
To make sure that your guitar is tuned to concert pitch, that in fact your open a string is an a note, you need a reference note to tune to. Tuning forks are the old fashioned way. Once you've established the tuning of one string, all others relate to it. These days, of course, electronic tuners are the way to go. But even if you don't have a reference note, you can still make music as long as your strings are tuned relative to each other in the manner described. There are many other ways to tune guitars, in fact you can invent your own, but (apart from discussions about alternate tunings) this site will always refer to standard tuning.