It would help if we knew how big the hole was. I'll give you roughly three answers. Hopefully one will work.
Small Hole ( < 1" ): You could get away with just applying some spackle or joint compound to a hole this small. Use a putt knife to apply the compound and smooth over. Let it dry, and I mean dry (several hours minimum. Over night is better.) Then sand it smooth with a medium grit sanding block. Apply another coat of compound, feathering the edges out to smooth the patch. Do this over and over until the hole is gone and the wall is smooth again. A pro could do it in 2 or three layers, but you just keep on doing it until it looks good. Don't rush and be patient. And let the mud dry!!!
Medium Hole ( < 4-5" in diameter ) - Your local home improvement center should carry drywall repair patches. They come in a variety of styles. Some are a paper mesh. Others are fiberglass. But they all serve the same purpose. They reinforce the patch to support drywall compond. To use one, follow the directions. Generally, you apply drywall compound to the patch, place it over the hole, and smooth it out with a putty knife. Then, do like you would for a small hole (above), i.e. layer, feather, sand - layer, feather, sand . . .
Big Hole - There are drywall patches on the market that will cover up to about a 12" hole, but I've never used one. For a big hole like that, I would cut out a square around the hole up to each stud (usually 16" apart) and replace it with a new piece of drywall of the same thickness (typically 1/2" greenboard in a bathroom). Use drywall tape and joint compound on the seams, and apply consecutive coats, smoothing and feathering between until smooth. And don't forget to LET THE MUD DRY!!!