Measure from the top of one subtread to the top of the subtread on the step above, and then cut the riser height 1/8 inch shorter than the measurement. The subtreads are the unfinished steps that are eventually covered with hardwood treads.
Measure the distance between the stair skirts on each side of the staircase. A stair skirt is the diagonal trim board that runs along the wall beside the steps. Cut the riser to match this measurement exactly.
Apply a 1/4-inch bead of wood glue to the back of the riser.
Fit the riser in place and push it upward, so the top of the riser is flush with the top of the subtread above it. Since you cut it 1/8 inch short, there will be a tiny gap at the bottom. The tread will cover this tiny gap.
Insert three finish nails, spaced evenly and vertically, through the hardwood riser, through the subriser and into every stair stringer. The stringers are the structural boards that support the subtreads and the subrisers. Typically, unless it’s a narrow staircase, there are three stair stringers, two near the edges of the staircase and one in the middle.
Repeat the measuring and cutting process to attach each subsequent riser. When all the risers are in place, install the hardwood treads and then fill the nail holes with wood putty that matches the wood finish.