This is a special type of move called "en passant" and you can look up that if you want to know the times you can play this. This move is winning here because this pawn capture also unleashes a discovered attack from your Queen attacking their King on g8. The King must move to h8 (or block the check like ...Rf7) and then your pawn can win the Bishop with cxb7 next move.
Weird Pawn Moves in Puzzles

https://www.chess.com/learn-how-to-play-chess
en passant and the other special moves are explained in the third section here

Thank you so much, and for responding so quickly! Shall follow your link to learn about "en passant" - haven't come across this move before. So much to learn, but I'm having lots of fun.

You watched 61 lessons on chess.com and has not encountered en passant at all? What are the chances of that?
Have been spending heaps of time on the Puzzles section of the chess.com website - probably because, as a newbie, I'm not brave enough to test my chess "skills" (or lack thereof) in actual games against actual people.
Several times, the "solution" to a puzzle involves a pawn moving diagonally, without any piece on that square to capture. This makes no sense to me - how can a blocked pawn simply move diagonally?! Have I missed a rule on pawn movements, or is it a glitch in the puzzle solutions engine?
See "hint" diagram in the screen capture below:
Any insights would be great. Although - reminder - please be kind to a newbie!
McFurtle