An introduction to general relativity