Use the left and right arrow keys or tap near the edges to rotate the ship. Press the up arrow key or tap the center to turn on the engine.
The ship now has a DRAG component. DRAG works by applying a velocity in the opposite direction of the ship movement whenever the ship is not accelerating. This causes the ship to slow down gradually when the engine is off.