Catch a ball in the back of the end zone, get two feet down, then get knocked out of bounds. Touchdown.
Catch a ball in the middle of the end zone, get two feet down, then the ball gets knocked out. Incomplete pass.
If you don't understand that you are probably an intelligent person.