The purpose of having your wheels aligned is to reduce tyre wear, and to ensure that vehicle travel is straight and true (without "pulling" to one side).
Having your wheels aligned will produce the least amount of rolling resistance, the least amount of tyre wear and the greatest amount of traction.
For most cars, aligning the front wheels will resolve many of the uneven tyre wear problems. However there will be some cases where all 4 wheels will need to be aligned.
The direction and angle at which tyres are set are both important. Wheel alignment involves checking the direction and angle against vehicle manufacturers' specifications and are both equally important. You may hear these described as toe in, toe out, positive camber or negative camber.
The "Toe" refers to whether the front of the tyres across an axle are closer or further apart than the rear of the tyres. Different types of vehicles need different toe settings to allow for the way that wheels pull either towards each other or apart.
The "Camber" is the inward or outward tilt of a tyre and is specified by the vehicle manufacturer.