The natbib package provides automatic numbering, sorting and formatting of in text citations and bibliographic references in LaTeX. It supports both numeric and author-year citation styles.
The natbib package is the most commonly used package for handling references in LaTeX, and it is very functional, but the more modern biblatex package is also worth a look.