Same procedure as general carpet cleaning. Pre vac, especially edges and where riser meets step. Careful if you run your fingers in there, there may be grippers! Pay particular attention to the noses. pre-spray with your weapon of choice and aggitate with a medium stiff brush, again the noses will need attention. Allow dwell time and give a quick dust over if it starts to dry out. I use a 4" hand tool on domestics and a larger twin jet on wider commercials. Techniques vary, I do the noses first, the reason is there will be overspray which will go onto the tread and the riser below. Then work on the tread, then the riser. The tread I do edges first. Dry extract and dress the pile with a pile brush when finished. A couple of things to bare in mind. There is concentrated traffic and wear in the centre and if it's worn you will never get it to look as good as the edges and risers, the other is the noses often expose the backing on cheaper carpet so even after cleaning they can stilll appear dirty.
If results are poor be sure you are not expecting too much from worn carpets or review your pre-spray choice. I use microsplitters, powerburst or multi pro with correct rinse.