LaTeX is a typesetting tool, the de facto standard for scientific publications.
MacOS Setup
Everywhere on the Internet you will be recommended to install MacTeX, which includes everything you will need. Although this is an hassle free alternative, I’d rather have as little junk in my hard-drive as possible, so I suggest BasicTeX (download), a minimal latex installation with the basics you need (such as latex and pdflatex tools working).
To create and edit tex files, I rely on my jack of all trades, TextMate and make sure to compile the file, and then watch it, so it updates automagically when you save the file. The downside is that you have to focus on the Preview window (which I do by cmd+tabbing).
If you are using an old template, you will see that it fails to compile due to missing modules. That’s the downside of a minimal installation, but the solution is as easy as apt-getting: sudo tlmgr install <module_name>. And it even selects the mirror that’s closest to you.
Finally, for managing my references I am using Papers.app (although I should definitely try Mendeley since it’s free and has a web interface). I import all the papers I am interested in. When writing an article, I select the papers I will need to reference, export them as a bib file, and then when I need one, I copy their citekey. As easy as that.