An introduction to celestial mechanics