How to determine the type of wall on which I'm putting up a shelf?
There are basically two things you have to determine - what is the supporting structure and what is the surface material.

First the support - in most private homes this is commonly wood frame, such as two by fours (boards, called studs, nominally 2 inches (5 cm) wide by 4 inches (10 cm) thick, but actually about 1.5 inches (3.8 cm) by 3.5 inches (8.9 cm)).  These run floor to ceiling and are most commonly spaced 16 inches (41 cm) apart, but in a few cases, 24 inches (6.1 cm) apart.

In some private homes and in recent apartment construction, the support is sometimes steel studs.  In cross section, these are thin walled boxes of steel that imitate, in size, function and placement, the wooden studs listed above.

In heavier construction, the support may be masonry - brick, poured concrete, concrete block, cinder block or tile blocks. These types of support are usually continuous across the whole wall.

Now the surface - in most recently built homes this is wallboard (also called drywall or plasterboard) ranging from about 3/8 inch (9.5 mm) thick to 3/4 inches (1.9 cm) thick. Most often, this is a layer of plaster with paper surfaces on both sides. Some newer constructions use paperless board.

In some older homes and in large buildings, the surface may be solid plaster that has been applied wet over either thin wooden horizontal slats or metal mesh.

In a few homes, the surface may be panelling of some sort, usually a type of plywood.  Some very old, cheaper construction may use a cardboard-like material that has very little strength (not common).

Determining the type - You can carefully remove the cover at a wall switch or outlet to see if the material is obvious at the edge of the box holding the switch or receptacle. Turn off the power to that outlet (or the whole house, if you are not sure) before removing the cover. If you see a paper surface on front and back, with plaster in between, it is wallboard. If you see an indication of wood strips or metal mesk behind the plaster, it is a solid plaster.  If it is plywood, you have paneling.

Perhaps more important in hanging things is to determine the supporting structure. Again at an outlet or switch, you may be able to see either wood or masonry behind the surface material, but this is often difficult.

An alternate method (that will help you later in hanging) is to see if there are hollows behind most of the surface material, indicating a stud structure.  This can be done by poking a series of small holes horizontally in an inconspicuous area with an awl or small drill (with plaster walls, do not use the awl method).  If you hit something solid after you are through the surface material, move three or four inches to the side and try again.  If it is still solid, you probably have some form of masonry.  If it is hollow, you probably have a stud structure (wood or steel).  

If it is a stud structure, you need to find out if it is wood or steel - if the awl or drill can be pushed (with some difficulty) deeper into the stud, it is probably a wooden frame structure.  If it seems very firm, it is probably a steel stud structure.

Once you determine the nature of the wall, you then can make decisions about how to hang (but that is another question).