Generally, you can sand a hardwood floor until the top layer of the groove is gone, which is about ¼ inch. However, you don't always have to do an aggressive sanding job to get the hardwood floor ready to be refinished.
If your hardwood floor finish is simply worn and has no major physical damage (like deep scratches, gouges, etc.) then I would not recommend using a floor belt sander. A floor belt sander is the kind of machine that has a 12 inch wide rotating sanding belt. In untrained hands, this machine is also the fastest way to permanently damage a hardwood floor and is therefore best used only by floor pros.
When sanding a hardwood floor, there are two better options for the do-it-yourselfer. First, you can rent a floor buffer with a sanding screen. This takes off the uppermost layers of the old finish and gets the hardwood floor ready for a new coat. The floor buffer is easy to use, and is inexpensive to rent.For hardwood floors requiring a bit more sanding, I'd recommend renting a machine called a U-Sand. This machine has 4 rotating, 6-inch sanding disks under one hood that serves to vacuum the dust off the hardwood floor as it is created. The U-Sander will not damage your hardwood floor and it is also easy to use.
After sanding, clean the hardwood floor thoroughly, then use a lambswool applicator to apply a good quality oil-based polyurethane to the hardwood floor. Do not use water-based polyurethane on the hardwood floor. It is not nearly as durable as oil-based and with all the work that goes into refinishing a hardwood floor, you don't want to be doing it again any time soon!