Trample works by requiring the attacking creature to assign at least "lethal damage" to each blocking creature before any damage can be assigned to the defending player (CR 702.19b). Lethal damage is defined as damage equal to or greater than a creature's toughness, regardless of whether the creature will actually be destroyed (CR 702.19c).
Indestructible means a creature cannot be destroyed by damage or by effects that say "destroy" (CR 702.12b). However, indestructibility does not change how much damage is considered "lethal" for the purposes of trample — the game still uses the creature's toughness as the threshold (CR 702.19c explicitly states that damage already marked on the creature is also counted).
So if you attack with a 5/5 trampler and your opponent blocks with a 2/2 indestructible creature, you must assign at least 2 damage to the blocker, and the remaining 3 damage tramples over to the defending player. The 2/2 survives (because it's indestructible), but the defending player still takes 3 damage.
This is a common surprise: indestructible blockers do not absorb all trample damage. They only absorb up to their toughness worth of damage before the excess carries through, just like any other blocker.
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.