An introduction to potential theory