Wipe down the table with a damp rag. If the table is dirty, clean it with Murphy's Oil Soap or mineral spirits.
Fill in any small holes with wood filler. For larger dents, use an auto-body filler, such as Bondo. Let the filler dry, and then shape the areas with sandpaper. If the legs are loose, check for missing screws, and replace them.
Using your hands or a palm sander, lightly sand the entire surface of the table with 150-grit sandpaper. Avoid exposing the bare wood, and only sand enough to smooth the surface. To clean off the dust, wipe the table with a damp rag.
Brush or spray on a primer that is suitable for sanding. Let the first coat dry, and then sand it. Apply a second coat, and let it dry before sanding again.
To avoid brush strokes, spray on paint or colored lacquer. Let the first coat dry, and then sand it. Apply one or more coats, sanding between each one.
To protect the paint from damage, brush or spray on a lacquer or polyurethane sealant. Allow the first coat to dry, and then apply a second one.