When I submit a paper to a scientific journal, it is reviewed by experts in the field before it is published. The experts might say that the paper should be published as it is. They might say that the paper should be published, but certain changes should be made to either make it more consistent with what we know or to provide better context for understanding the results that are being presented. The reviewers might say that the article shouldn’t be published, because it contains poor science or because the results aren’t important. This is the process of peer review.
I have been on both sides. I have submitted papers for publication that went through peer review, and I have been a peer reviewer for scientific journals in my area of expertise. Although neither process is particularly enjoyable, I think it is a very important part of science. Indeed, even though it is not required, I have all of my science texts reviewed by at least two experts before they are sent to the publisher. These experts often catch errors that I have made, and they also add valuable comments that allow me to improve the way I discuss certain topics. My textbooks are significantly better because they are peer-reviewed.
Of course, there is also a problem with peer review. It can lead to the suppression of scientific results for unscientific reasons. I have experienced this personally. I recall one paper that my collaborators and I submitted to a nuclear physics journal. It was rejected by the peer reviewers, and the journal said that it would not be published. We looked at the reports of the peer reviewers and showed the editor that the reviewers’ objections were without merit. The journal agreed to send it to two more peer reviewers, who both accepted it with only minor corrections.