The primary purpose for a vertical stabilizer on an aircraft is to
provide lateral stability and minimize unnecessary yaw. A rudder is
usually attached to trailing edge for yaw control. This is manipulated by
the rudder pedals in the cockpit, usually supplied to both the pilot in
command and the right seat as well. On a canard configuration there are
two vertical stabilizers, called winglets with a small rudder
surface on each wing.
The Beechcraft Bonanza V-35 V-Tail and the F-117 combine the
vertical and horizontal stabilizers into a v-shaped configuration. This
helps to reduce drag with little or no loss in effectiveness.
On an interesting side note some American WWII bombers would return
from combat with large sections missing from various control surfaces,
one of the easiest to hit, being the vertical stabilizer.
An airplane can fly without a vertical stabilizer, one example is the B-2
Spirit stealth bomber. Designs such as these tend to be extremely
unstable, thus requiring a computer to maintain stability with the other
control surfaces, allowing the pilot to maintain control of the
aircraft.