We're talking here about correcting reasonably small variations in the straightness of a tyre, not the situation where the wheel has been driven over by a car!
You can check the straightness of your wheels quickly and easily - turn the bike upside down on a flat surface, and spin the wheel quite slowly.
While the wheel spins, watch closely the distance between the wheel rim and the brake block.
If the wheel is completely true (straight) the gap between the two will remain constant, but if the wheel is slightly out of line you will see the gap getting slightly larger and smaller with each turn of the wheel.
If you don't actually check the straightness of your wheels very often, the first time you may notice there is a problem is when a part of the wheel starts rubbing gently on the brakes, each time that the wheel turns once.
The next challenge is to identify and mark the part of the wheel which is not straight, and correct it.
As the wheel spins, turn it slowly and you will be able to see the exact point where the gap between the wheel and one of the brake brake pad suddenly becomes smaller. Mark this point with chalk or a pencil.
Note: You will be adjusting the spokes on the opposite side of the wheel fom this narrow point.
Usually this point will fall between two spokes that connect to the other side of the wheel - you want to tighten the spokes on the opposite side because that will 'pull' that section of wheel straight again. The most common cause of a wheel going out of true is that a spoke or two have become slightly loose.
You will need a spoke key to do this properly. They don't cost much and are the right size to tighten the fittings on a spoke. It's not impossible to do with pliers etc, but soon enough you'll flatten the part you want to tighten and have difficulties continuing, or end up needing to replace the spoke. Buy a spoke key before the problem arises!
Using your spoke key, tighten both of the spokes on the opposite side of the wheel by a small amount. It is very important to do this slowly, in 1/2 turns or less at a time! After this small adjustment, check whether that was enough to correct the problem.
More slight adjustments might be necessary, but note that if you overtighten the spokes too much you will be taking the pressure off (i.e. the same as loosening) the spokes nearby, which will cause subsequent problems.
Proceed slowly and carefully and straightening a wheel is a very quick and straightforward job. Overdo the spoke tightening however and you'll be down at the bike shop looking for a wheel rebuild in no time at all. So try it, but with some caution!