The first thing you need to do before replacing any damaged pieces is cut the grout out of the joints surrounding the damaged sections. This keeps the movement of you removing the old pieces from spreading to the new ones. If the grout joints are left in place the removal of the broken pieces can trigger a chain reaction that cracks surrounding pieces.
All remnants of the old tile as well as the thinset needs to be removed before you can reinstall new pieces. This means taking everything back down to the bare wood. You can chisel or use a floor scraper to remove the thinset, or you can sand it down with a belt sander, but bare wood needs to be the end result. After that you can clean the step and install your new tile.
Ceramic tile is supposed to be installed on top of underlayments that are either fiber or concrete based. However, over the years there have been modifications made to the polymers that are added to the thinset mortar, and these days you can find mortars that are specifically rated for use with wood surfaces. As long as you use the proper thinset and grout your new stairs will last for years to come.
If you have a stairwell that is in a high traffic area and you need the stairs back in working order within a matter of hours rather than days, you can opt to use rapid setting mortars and grouts. Designed to set up within a matter of hours rather than the 72 hours traditional mortar and grout are designed to cure for, rapid setting materials are the only option for businesses and other areas that need the stairs back in action as soon as possible.