"Editors of scientific journals send papers out for formal evaluation of their intellectual merit by the authors' scientific peers — other scientists, typically anonymous — who work in the same or a closely related field. Peer review is a kind of scientific 'natural selection'; papers that can withstand the scrutiny of this process will find their way to publication and are often substantially stronger for it. Papers that cannot are rejected. Of course, the authors may have the opportunity to resubmit after making further revisions, or they may try their luck by submitting to another journal.
"Peer review does not necessarily determine whether the conclusions of a particular study are correct; that may ultimately require further work that either confirms or refutes the conclusions. Instead, the peer review process is designed to prevent the publication of papers so obviously flawed as to be clearly invalid with regard to the claims made or conclusions drawn, and unlikely to add usefully to the scientific discourse” (78-79).
Mann, Michael E. The Hockey Stick and the Climate Wars: Dispatches from the Front Lines. Columbia UP, 2014
"The goals of peer review are both lofty and mundane. It is the responsibility of journals to administer an effective review system. Peer review, as currently practiced by high impact biomedical journals such as Nature Immunology, is designed to select technically valid research of significant interest to, in our case, the general immunology community. Referees are expected to identify flaws, suggest improvements and assess novelty (providing citations of papers that detract from the impact of the paper under review). If the manuscript is deemed important enough to be published in a high visibility journal, referees ensure that it is internally consistent, thereby ferreting out spurious conclusions or clumsy frauds."
“Reviewing Peer Review.” Nature Immunology, vol. 4, no. 4, Apr. 2003, p. 297. MEDLINE, doi:10.1038/ni0403-297.