An attacking creature with trample that is blocked assigns lethal damage to its blockers and can assign the excess to the player or planeswalker it is attacking.
A 6/6 trampler blocked by a 2/2 still pushes 4 damage through.