Rolling means closing your current option and opening a new one with a different strike or expiration. It extends the trade and can improve your position.
Roll out: Same strike, later expiration. You buy more time. Roll up: Higher strike, same expiration. Used on calls when the stock rises. Roll down: Lower strike, same expiration. Used on puts when the stock drops. Roll out and up/down: Change both strike and expiration.
You sold a 100 put expiring in 10 days. Stock dropped to 101. You roll to the 95 put expiring in 40 days. Close the 100 put for 2.50. Sell the 95 put for 3.00. Net credit is 0.50. You moved the strike down 5 dollars and added 30 days for a credit.
You still believe in the trade. The stock moved against you but your thesis is intact. You can roll for a credit. Paying to roll means adding to a loser. You have time. Rolling with 2 days left is harder than rolling with 10 days.
Your thesis is broken. You were bullish and now the stock is in a downtrend. Rolling does not fix direction. You have rolled multiple times. Each roll ties up capital. At some point, close and move on. The roll costs money. If you cannot get a credit, take the loss.
Only roll for a credit. Have a limit of two rolls per trade. Roll before the stock hits your strike. Close if you cannot roll for a credit.