How do I fix a hole in drywall?
Depending on the size of the hole, there are different methods to fix. 

Small holes - As @Oscilatingcretin says just some spackle, sand, and paint you are done.

Medium holes - A fist size hole or bigger is harder.  Cleanup the hole area.  Then take one or more more pieces of strapping and attach to existing wall to serve as foundation for the replacement piece of drywall.  Cut replacement piece of drywall and fit to opening, attach to strapping installed previously.  Then just fill in the gaps and screws with mud, sand, and paint.

Here's a diagram to help to visualize, let's say the hole is the wall is around 6" by 6":


Larger holes - Most likely you will have to find the nearest stud to the left and right and make the existing hole bigger so that the new piece of drywall can be attached directly to the stud.   For the top and bottom, you will have to cut some strapping or framing so the the replacement piece can be secured to the top and bottom as well, otherwise the seem will crack.  Once the framing is in place, cut the replacement piece and secure to studs and new framing.  Tape, mud and sand around the edges of your new piece.  Paint.  If done well and the mud is feathered out, one will not notice the replacement piece of drywall.

Here's a diagram to help to visualize, lets say the hole is 12" by 12":


For holes larger than that, probably best to replace the entire wall.