Use stripper to remove the old polyurethane and stain. I like gel stripper, I coat the table, let sit for 15-20 minutes and then scrape off the finish. Then, repeat and repeat until all the stain and poly is gone.
Turn the table over. Sand and paint the base and legs the color you prefer. You could also use spray paint.
Use painters tape to keep paint off of the stripped wood.
Sand stripped wood, sand again. Make sure ALL of the poly and stain is gone.
Apply the stain of your choice. You can apply multiple layers and different types of stains to achieve the color you want. I always stain a small piece of scrap wood with the different stains and layers (labeling as I go right on the wood) as a test to see what combo I like the best. Then I use this as a guide to choose the stain for the table.
If you want a shiny, durable finish, use polyurethane. I use water based. Poly is very finicky, clean the surface with mineral spirits before the first coat. Also, you can thin the poly with mineral spirits, this takes longer to dry, but gives you thinner, easier to work with coats. Sand with VERY fine sand paper between coats of Poly. Let dry thoroughly between each coat. I usually waited at least 24 hours. Sanding with Steel Wool 000 gives a very fine sand, and produces a very smooth finish. Make sure to wipe off the table with mineral spirits after each time you sand. Once the poly is smooth enough and thick enough after it has dried- you are finished with the poly coats.
Reattach the legs and enjoy your new table.
I usually let my furniture sit for a good week before I bring it into the house so the paint and stain can harden and set.