Brick walls
For masonry walls use a hammer drill to make a hole in your wall; gently tap in a plastic wall plug (make sure it's the right size for the size of the hole or it won't hold) then screw in a hook.These are often sold as a set.
Gyprock/plasterboard
The first thing to remember is never to just hammer or screw a hook into plasterboard as there is nothing for it to hold on to. You are likely to end up with your art, hook and part of your wall on the floor.
There are special hooks specifically designed for plasterboard walls. These resemble oversized screws and can be wound directly into plasterboard; they then expand the spread the pressure across the wall. Once they're in the wall, simply wind your hooks into them to hang your picture. They can be easily removed by unscrewing them.
Another option is to find a timber 'stud' and secure the wall fastener into that. This is part of the frame that the plasterboard is attached to. If you tap on your plasterboard wall, the part over the timber will sound less hollow. You'll need a hanger that's long enough to go through the plasterboard and into the timber.
Timber
There is a wide range of hooks suitable for timber walls including brass hooks which have channels for matching nails. You simply tap those into your timber wall and hang your picture.
Rental properties
Adhesive, removable wall hooks are handy if you are renting. Make sure the wall is clean and dry before attaching the hooks to the wall. Just to be on the safe side, never hang a picture where it can fall on someone if the adhesive hook fails.
Whatever your walls are made of, make sure the hooks or fasteners you are using are suitable to hold the weight of the picture you are hanging - it will usually tell you about the maximum weight on the packaging.
You can also call your local handyman to take care of any picture hanging tasks. They'll have the experience and know-how to make sure it's done right first time (no more bumps in the night!).