Relative to its planets, the sun is actually a stationary body, but it appears to move due to Earth's rotation. However, it is important to recognize that nothing is ever truly stationary.
At some level, everything in the universe is orbiting something else, often something many times larger. This is a function of gravity, as larger objects act against smaller objects, eventually drawing them in closer over time. Alternately, not all planetary or stellar bodies have a rotation, though all known planets in our solar system do. It is this rotation which provides day and night cycles and prevents one side of a planet's surface from being over-exposed to the damaging rays of the sun. It is theorized that Earth's rotation is the result of a massive planetary impact, which also gave Earth its iron core, spawned its moon and caused the 23.5 degree tilt of the planet's axis. As a planet or other body orbits its parent star, it does so in an oblong, or elliptical path. This means that instead of going around in a perfect circle, the orbit itself is elongated at either end. As a result, the Earth drifts from far away to closer to the sun throughout its orbital path.