Determine what has caused the carpet to ripple. If the edges of the carpet have unraveled, you can't re-stretch it since there is nothing for the tack strips to grip.
Remove the furniture.
Use a knee kicker extended to the dimensions of the room to re-stretch the carpet over the existing tack strips if they seem to be gripping and the ripples are not extensive. The knee kicker is what it sounds like and will stretch the carpet forward to catch on the tack strip as you hit it with your knee. A power stretcher is an alternative to consider.
Carefully pull the perimeter of the carpeting loose if the padding or the tack strips need to be replaced or if the rippling is extensive.
Replace the padding if needed. Pry off the old tack strips and discard. Use a hammer and chisel to cut the replacement tack strips to length, and nail them in place about ½ inch from the wall.
Lay the carpet back down, and use a knee kicker first to engage the carpet over the tack strips. Use a power stretcher, if desired, to work it until tight.
Use a carpet stair tool to fit the carpet between the tack strip and down along the baseboards.