Move the side table to an outdoor location or to a garage. Put on safety glasses and a dust mask. Sand the entire surface of the table with a medium-grit sandpaper to roughen it and to remove loose paint chips. Wipe the table down with a tack cloth after sanding to remove all dust from the surface.
Open a can of latex primer and apply it to all surfaces of the side table using a paint roller for the flat areas and a paint brush for the small crevices and the legs. Allow the coat of primer to dry fully before proceeding.
Open a can of any colored semi-gloss latex paint and apply three coats to the side table just as you did with the primer. Allow each coat to dry thoroughly before adding the next one.
Wait until the paint is fully dry and measure the top width and length of the table with a tape measure. Transfer the measurements onto a piece of 5- to 6-inch-thick upholstery foam using a felt tip pen. Cut the foam out using a sharp utility knife or a serrated kitchen knife.
Open your desired fabric on a flat surface and mark out the table measurements onto it, adding 12 inches to both the width and the length. Cut the fabric out using scissors.
Center the foam on top of the side table and then lay the fabric on top of it with the finished side facing upward.
Wrap the fabric under one end of the table and secure it with a staple gun. Space the staples at 3- to 4-inch intervals, or as needed to pull the fabric tight. Repeat the process on each of the remaining sides, pulling the fabric tightly as you do so.