Sick of your guitar going out of tune? There are things you can do to help. I'll start from the top of the guitar and work down.
01. Machine heads
a. Fitting Locking Tuners
b. Other Tricks
02. The Nut
05. String trees
01. Machine heads
a.Fitting Locking Tuners
The first and most effective method of sorting out tuning issues is locking tuners, such as Sperzel, Gotoh or Schaller.
What this does is to do something similar to the Floyd Rose's locking nut, and make certain that the strings cannot slip by clamping them down at the tuner instead of the nut. On a hard tail, this will end virtually all tuning issues, however it does cost a small amount of money and there are installation issues such as the fact that with some lucking tuners (eg Gotoh) the hole for the machine head in the headstock needs enlarging to accommodate for the new tuner.
If your machine heads are rather loose take a small screwdriver and tighten the screw in the middle of the button you turn, however not all have this most do but not all (thanks Silent Def you akward sod). If it is bone or wood take care not to over tighten, because you will split it.
While we are on machine heads, when you re-string make sure the string is wrapped round the post at least 3 times to prevent slippage, which wrecks your tuning.
02. The Nut
There could be two problems here, the worse of the two is that the grooves are too tight and squeezing the string. A temporary solution is to put graphite (pencil lead) in there either by colouring the slot in or dropping powdered graphite (break a pencil open and crush the lead to make this). A more permanent solution is to simply widen the slots with nut files. If you are not confident about doing this yourself, take it to a professional as you can really damage your guitar if this goes wrong.
The second is just friction from the string pressing against the nut. Once again this can be solved with some graphite in there to the decrease friction which is a major cause of tuning instability, unless it's locking (i.e. Floyd Rose) in which case this section is irrelevant.
Unless it is locking (even then if it's a cheap model you'll have grief from it) it will go out of tune fairly fast. If you don't use it, lock the trem and turn it into a hard-tail - this can be done either by adding/tightening the springs in the back so it can't move or wedging it with bits of wood. Or even both if you want to go for overkill. However if you use it quite a bit then you need to reduce the amount of friction. Once again graphite is your friend, but it can only do so much before you find what you need is actually a better trem.
When you change your strings stretch them. This will get most if not all of the excess "give" in them, personally I stretch them as far as possible for 60 seconds each, and have absolutely no problem from them. However this may differ between gauges (I use 9's).
The other thing to take into account is down tuning, unless you're Tony Iommi and chopped the tips of your fingers off, don't down tune 9's to drop C! They will be too floppy and go out of tune; do a Stevie Ray and compensate with a heavier gauge (just don't go overboard and use 18's like he did at one point).
05. String Trees
These don't appear on all guitars but on those the do have them make sure they are not screwed down too far. You need some downward angle on them but not too much or you will create too much friction both here and also at the nut.
Well hope that helped you out and I hope you stay in tune a little better for longer