@DarkStar
The pawn takes by moving diagonally forward. So the attacked pan can take the attacking pawn.
The pawn moves forward without taking: so the pawn can move one or two steps forward, but not capture, and after moving foward it can't take by moving backwards.
But maybe you see apawn moving two steps forward and an attacking pawn capturing as if the (first) pawn had moved only one step forward. This is called en passant and is explained in the rules.