All citation styles have a common purpose: to document the history of ideas. Each formal style—American Psychological Association (APA), Modern Language Association (MLA), Chicago—uses a different approach to achieve that goal driven by the history and focus of the scholarly community that produced the citation style. Chicago’s Notes and Bibliography (NB) style aims to keep in-text citations to a minimum for readability, for example, while APA style is focused on proper attribution of ideas to people in the main text itself.
Failure to follow some citation style in your writing will lead to accusations of theft of ideas—known as plagiarism—a very serious offense in communities where reputations and careers are built on the strength and originality of your ideas. Plagiarizing can prevent you from receiving an academic degree, lead to already awarded degrees being revoked, book deals being canceled, books being pulled from stores, and job loss, especially if your having been offered the job was based on a degree you received that is revoked.
Each academic discipline chooses which style of citation is customary: humanities tend toward MLA, social and behavioral sciences tend toward APA, and history and political sciences tend toward Chicago. Ask a trusted advisor what the preferred style is for your academic discipline. If you’re hoping to publish your writing, individual journals and publishers will inform you of their preferred style, which may differ from your academic discipline’s style preference.
Because there are so many different styles, each with its own quirks—should you use full first names, or only first initials? list the publication date in parenthesis, or simply followed by a comma?—it can be very helpful to use a citation manager to store the details of the works you cite in a database. The manager can then generate both in-text citations and a references or works cited list in any style you need and, if you need to change styles later, will quickly reformat your citations. Mendeley and Zotero are free, full-featured citation managers. Microsoft Word’s built-in citation manager may meet your needs, although it has only limited options for output. The ability to quickly reformat citations in different styles is particularly helpful while in school, where each teacher, faculty member, or department in which you take a class may have a different preferred style.
One general note on citing sources that you find online: check your URLs carefully to be sure they are reachable by the general public.
The purpose of a citation is to allow readers to trace the sources of your claims. If you provide a URL that requires membership in a particular group to access—a professional society login or a university affiliation—then readers can’t find your source material. Paywalls may be unavoidable, but at the least, a direct link to the paywall where readers could purchase the content, if needed, is expected. A quick Google search for the title and author will usually turn this up. Be sure to cite the same version or edition of the source material that you used and be sure not to cite the Google search URL itself!
I’ve written a separate post to serve as a quick guide for APA style citation. I also offer a quick guide for Chicago Notes and Bibliography style citation.