An astronomical unit (AU) is a unit of distance, approximately equal to the mean distance between Earth and Sun. Earth's orbit is not a circle but an ellipse; originally, the AU was defined as the length of the semimajor axis of said orbit. For greater precision, the IAU in 1976 defined the AU as the distance from the Sun at which a particle of negligible mass, in an unperturbed orbit, would have an orbital period of 365.2568983 days (a Gaussian year). The AU is thus defined as 1.4959787066E+11mm (about 150 million kilometres).
At the time the AU was introduced, its actual value was very poorly known, but planetary distances in terms of AU could be determined from heliocentric geometry and the laws of planetary motion. Eventually the actual value of the AU was determined (approximately) from parallax observations, and more recently (and precisely) by radar. While the value of the astronomical unit is now known to great precision, the value of the mass of the Sun is not because of uncertainty in the value of the gravitational constant. Because the gravitational constant is known to only five or six significant digits while the positions of the planets are known to 11 or 12 digits, it is impossible to do calculations about the position of the planets in SI units without losing precision in the unit conversion. Therefore calculations in celestial mechanics are performed in solar masses and astronomical units rather than in kilograms and kilometers.
Some approximate conversion factors: