Pawn moved sideways?

It's hard to tell for sure, since something got messed up with the formatting, but I presume that you aren't aware of the possibility of the special move known as En Passant.
https://en.wikipedia.org/wiki/En_passant

It'll bite you the first few times you get caught by it, but eventually you will come to remember it when planning your ideas as easily as remembering castling.