The engine does not move, the air flow is only redirected. The method of redirecting the flow varies with the size, configuration, and manufacturer of the engine. The flow does not need to be directed completely forward; the flow is generally mostly outwards and partially forward. This is still enough to create significant drag and slow the aircraft down.
In smaller and older engines, the entire flow is redirected. This corresponds to the first two configurations below. Buckets or clamshell doors close over the jet flow to redirect the air.
In larger engines, particularly high-bypass turbofans, only part of the air is redirected. This corresponds to the last configuration below. The core air from the engine still exits normally, but the bypass air from the fan is redirected. Since the bypass air on these engines is a much greater flow than the engine core air, this results in a net reverse thrust. There are multiple mechanisms, but the general idea is to deploy doors that block the bypass air and send it through the sides of the engine cowl.
Turboprop aircraft just change the pitch of the propeller blades such that the propeller pushes air forward instead of backward. The pitch in which the blades provide reverse thrust is called the "beta range."
In civil aircraft, reverse thrust is only used when on the ground. There are typically interlocks in the system that prevent the thrust reversers from deploying if the aircraft does not sense that it is on the ground. Once the aircraft touches down, the pilot will deploy the reverse thrust. Some military aircraft like the C-17 can use reverse thrust in the air. This enables them to perform very steep descents.
Reverse thrust is more of an "optional" method of braking (see this related question), only to provide extra stopping power when needed. This particularly helps when braking force is less effective, such as in rain or snow. Before landing, pilots will take into account the wind, aircraft weight, runway length, and any contamination of the runway (rain or snow). Based on this they will know what kind of braking force is needed and whether they should use thrust reversers.
The thrust reversers don't always have to be operational for an aircraft to fly. Some operators choose to disable them, which decreases maintenance costs. The thrust reversers can also break, in which case they will be mechanically locked to prevent them from deploying until they can be fixed. Pilots will consider this when they are computing their landing distance.