There are three main mechanisms (devices with moving parts) on board Mars Reconnaissance Orbiter:
Each of these mechanisms, called gimbals, can move about two axes in much the same way that your wrist allows your hand to move in two axes: left/right and up/down. By contrast, your knee only has one axis of motion, but your neck has three.
As the spacecraft travels around Mars each orbit, these gimbals allow both solar arrays to be pointed toward the Sun, while the high-gain antenna can simultaneously be pointed at Earth.