Gain access to the underside of the stairs. This can involve removing some paneling or drywall.
Locate the wood wedge where it is lodged between the tread and the riser or stringer. Look for any nail heads, and remove them with the claw side of a hammer. Use a nail remover tool, if necessary.
Rock the wedge back and forth with your hands or a pry bar. Try to break the dried wood glue that holds the wedge in place. Work the wedge out, breaking it into smaller pieces, if needed.
Sand down any adhesive that still remains in the spot. Clear out any small pieces of leftover wedge and prepare the space to accept the new wedge.
Insert the new wood wedge into the space as a dry fit. Shift it around until it fits tightly. Remove the new wedge for now.
Apply wood glue to one side of the wedge. Press the wedge into the slot between the tread and the riser or stringer. Tap it in tightly with a hammer.
Drive two to four 1-inch nails through the wedge and into the tread. Wiggle the wedge to ensure that it does not move. Insert any other wedges that you want on other steps while you have access to the underside.