Primary sources are the leading edge of research-- the first discussion of what is going on in the field, in the sciences and sometimes in the social sciences. They will use other publications as support, but contribute new knowledge to the scholarly conversation. But historians and scholars of literature and art think of primary works differently-- see below.
What is considered a primary source varies somewhat by discipline. In any case, think of a primary source as first-hand knowledge, eyewitness accounts, reports or testimony about (X topic).
In the fields commonly considered sciences, a primary source is the first report of research, published as a journal article, a research report or conference proceeding, or if extensive, a book or book chapter. They include methodology, data and results, and discussion.
In social sciences, such as anthropology, ethnography, psychology, sociology or social work, a primary source may be the first report of research, especially of empirical studies, or, since some areas of these fields depend on direct observation of behavior or analysis of interviews or personal narratives, the products of this analysis may still be considered a primary work.
For history, and in some other disciplines, a primary source is a letter, a diary, speech, lecture, piece of legislation, document or manuscript-- an original source which forms the basis of secondary work. A narrative is a personal account, by a single individual, of a period of time or an event.
In the arts, a primary source may be a piece of art, such as a painting or sculpture, a musical score, a poem, a book or chapter, or an essay--whatever is directly created by the artist, writer, photographer, etc.
A secondary source is based on other sources. It includes analysis, criticism, or other intellectual input. Review articles are based on analysis of the published 'literature' (books, articles and dissertations about the topic). Secondary sources can include books, book chapters, articles, especially literature reviews, and some book reviews.
A tertiary source is commonly a resource or tool that helps people find primary or secondary sources. Tertiary sources include most bibliographies, databases and indexes, and library catalogs.
Here's a great definition from the American Library Association:
"Primary sources are original records created at the time historical events occurred or well after events in the form of memoirs and oral histories. Primary sources may include letters, manuscripts, diaries, journals, newspapers, speeches, interviews, memoirs, documents produced by government agencies such as Congress or the Office of the President, photographs, audio recordings, moving pictures or video recordings, research data, and objects or artifacts such as works of art or ancient roads, buildings, tools, and weapons. These sources serve as the raw material to interpret the past, and when they are used along with previous interpretations by historians, they provide the resources necessary for historical research."
--Using Primary Sources on the Web, rev. 2008.
Peer review is the process by which articles or other works are critiqued before they are published. Authors send articles to an editor, who decides whether the work should be forwarded to reviewers for the journal. The most stringent form is anonymous or blind review, where neither the author nor the reviewers know whose work is being examined by whom. This helps reduce bias.
Reviewers are usually well-published researchers and experts. They return the articles to the editor with remarks and recommendations-- usually publish as is (rare), publish if edited or changed in specific ways, or don't publish. Editors most often go with the recommendation of the majority of the reviewers.
The process is intended to improve the studies published-- more eyes on a project, and one's reputation on the line with peers, tends to improve the quality of what's published. There are cases where it hasn't worked, and critics of the peer review cycle (some claim that it limits innovative studies, among other issues), but it is the best system that has been developed to this point.
Peer-reviewed or referreed or scholarly are often descriptions used interchangably for reputable journals. Not all scholarly journals are peer-reviewed, but many are.