If you had a 7/7 with trample and an opponent had a 0/2 the 2 damage would be prevented and you opponent would take 5 as you only ever assign lethal damage to a creature unless the creature says otherwise so yeah the trample damage goes through. This is the same for protection from as well.