First you will need to remove carpet, staples and tack strip. If your treads are not solid wood you will need to replace them. This can be a big expense so be sure you are prepared. Assuming you have solid wood you will then fill holes with wood filler. Then sand the entire wood tread with 120 grit to remove any debris and possible glue. You can then stain them.