Use the natbib package by Patrick W. Daly.
This is definitely a package so complex and large that it needs to be studied before you attempt to configure it (although it has out-of-the-box defaults that may work for you).
If you want to use its capabilities to the fullest, you will need to use the tools supplied with this package to actually generate a custom bibliography style, and then use that style in your document via the \bibliographystyle{} command.
In the preamble:
\usepackage[square,authoryear,sort&compress]{natbib} %% Custom bibliography style defined using the Makebst utility %% that comes with the natbib package. \bibliographystyle{bib/bibleo}
Citing reference in the text:
Listing references in the bibliography:
Citing reference in the text:
Listing references in the bibliography: