Attitude is the term that describes a spacecraft's orientation in relation to its direction of motion. Spacecrafts and satellites must know their attitude when pointing a camera or directing a radio antenna for contact with Earth.
In the vast, weightless, and frictionless environment of space, spacecrafts are capable of moving from sided to side on a horizontal plane (yaw), up and down on the vertical plane (pitch), and around the axis of flight (roll).
And according to Newton's Laws of Motion, all objects tend to keep moving in the same direction unless acted by some other force. Since space is frictionless, spacecrafts simply fire a rocket or a small thruster in the right direction. Other rockets or thrusters may consequently be fired in order to change its course.