Subfloor is the first layer of floor material, sitting directly on the floor joists, and generally is made of 3/4 inch tongue-and-groove plywood. Normally, the subfloor will be topped by a plywood or particle-board underlayment before installing your floor covering. However, hardwood flooring can be installed directly over subfloor, as long as it's very solid and immobile. Go over the subfloor with a screw gun, sinking long wood screws alongside the nails in the joists for added stability.
If the underlayment over your subfloor happens to be particle board instead of plywood, you'll have to either pull it up or cover it with plywood, because particle board won't adequately hold the flooring nails and staples in place. To apply a plywood underlayment---over either subfloor or particle board---use carpenter's glue and screws, and lay in it in staggered rows. If you're going over particle board, make sure the screws are long enough to go all the way through the particle board and into the subfloor below it.
Whatever the base of your floor structure, you should lay flooring paper over it before you install your floor. This is crucial if your underlayment is covered with, say, vinyl, which shouldn't sit in prolonged direct contact with the wood. Flooring paper (also called ``builder's felt'') is a thick, black paper that gives you a smooth, flat work area, while providing some protection from moisture buildup. Roll the paper out in rows, overlapping a few inches at the edges, and staple it down with your staple gun, putting staples about every two square feet.