A gas is a lot of molecules which are a gas because they don't stick together to form a solid or a liquid. They are always bouncing around. They bounce off of each other and they bounce off of the inside walls of any container they may happen to be inside of. In a closed container, they are bouncing against all the sides equally, creating an outward pressure but exerting a net zero force on the container as a whole, except outwards. The hotter the gas, the faster the molecules are moving and the harder they are hitting the sides of the container. If the gas is hot enough and the container weak enough, it can burst.
In a rocket engine one wall of the container has a hole in it (the nozzle). Fuel and oxidizer are injected into the chamber where it burns because it's fuel and oxidizer and that's what fuel and oxidizer do when they get hot enough, which is why a candle keeps burning once you light it. (The rocket engine has an igniter to start the burning, just like you light a candle with a match.) So now the gas gets really hot because it's burning and the molecules are moving very fast and hitting the sides of the chamber really hard. Pushing outward on the container really hard.
But there's a hole in one wall that the molecules escape through. So there's less pressure on that wall, which is always facing backwards so the rocket doesn't go the wrong way. Thus there's more molecules hitting the front wall than the back wall and that pushes the rocket forward. Newton's action/reaction is happening on the front side of the combustion chamber where a molecule hits that side of the chamber but then never hits the back side to even the pressure because there's a hole there.
This works in space because it doesn't matter where the molecules go as long as they miss hitting the back of the chamber because they go through the hole instead. It's a little more complicated because the molecules are also hitting each other, but the important part is that because of the hole in the back, more of them are hitting the front. This would work even if the Earth were round.