A creature with 0 toughness is subject to state-based actions: as soon as it exists on the battlefield with 0 or less toughness, it is put into the graveyard (CR 704.5f). This happens before blockers are even assigned combat damage, so the 0-toughness creature ceases to exist as a blocker.
Trample requires the attacking creature to assign lethal damage to each blocking creature before assigning the remainder to the defending player or planeswalker (CR 702.19b). Lethal damage is the amount equal to a creature's toughness minus any damage already marked on it (CR 702.19c, 510.1). A creature with 0 toughness has already been removed from combat via state-based actions, so there is no blocker remaining to assign damage to.
With no blocker present, the trampling creature is essentially unblocked at the damage assignment step, and all of its combat damage is assigned to the defending player. This is consistent with CR 509.2, which governs how trample damage is distributed among blockers and the defending player.
Example: You attack with a 5/5 trample creature. Your opponent blocks with a creature that has been given -3/-3 by an instant, reducing it to a 0/0. State-based actions put that 0/0 into the graveyard immediately. When combat damage is assigned, there is no blocker, so your 5/5 assigns all 5 damage to the defending player.
Note: If the blocker had, say, 1 toughness remaining (not 0), you would still need to assign at least 1 damage to it before assigning the rest via trample to the player.
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.