Marked damage on a creature is removed during the cleanup step, which is the final step of the ending phase (CR 514.2). This is distinct from the 'end step,' which comes just before cleanup. Effects that trigger 'at the beginning of the end step' or 'at end of turn' happen in the end step — damage is still present then, but it will be wiped in the very next step.
CR 514.2 states: 'Second, the following actions happen simultaneously: all damage marked on permanents is removed...' This happens automatically, without any player receiving priority, and without any spells or abilities being cast in response.
This matters for creatures with regeneration or indestructible. A creature that survived lethal damage during combat (because it regenerated or is indestructible) has that damage cleared in cleanup, fully resetting it for the next turn.
Example: Your 2/2 creature blocks an attacking 3/3. The 2/2 takes 3 damage and would die — but suppose it has indestructible. It stays on the battlefield with 3 damage marked on it through the end step. Then during cleanup, all 3 damage is removed, and your 2/2 enters the next turn at full health.
Remember: 'end of turn' triggers (end step) fire while the damage is still there, but by the time cleanup occurs, all marked damage is simultaneously erased from every permanent on the battlefield (CR 514.2).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.