Definition provided by RUSA (Reference and User Services Association):
Primary sources are the evidence of history, original records or objects created by participants or observers at the time historical events occurred or even well after events, as in memoirs and oral histories. Primary sources may include but are not limited to: letters, manuscripts, diaries, journals, newspapers, maps, speeches, interviews, documents produced by government agencies, photographs, audio or video recordings, born-digital items (e.g. emails), research data, and objects or artifacts (such as works of art or ancient roads, buildings, tools, and weapons). These sources serve as the raw materials historians use to interpret and analyze the past.
Definition provided by Bodleian Library (University of Oxford)
A primary source is a work not based on or derived from another source (e.g. contemporary records, data & statistics, conference papers, photographs, working papers).
A secondary source includes the use, analysis, interpretation of primary (and other) sources.
A practical overview (Howard S. Carrier, Social Sciences Librarian at JMU):
Primary sources are typically firsthand accounts (examples might include someone's journal or diary), or they are documents produced at the same time as the events they record - examples include photographs, newspapers, law reports, government documents (such as Congressional hearings), or research reports documenting the findings of original research. They represent the work of their original authors or creators, not later analysis of that work by another person. For example, photographs of the dust storms taken during the Great Depression can be regarded as primary sources about the Great Depression in rural America in the 1930s.
Secondary sources represent an another person's analysis of events or findings, and frequently draw upon primary sources in their analysis. If an historian in 2018 writes a textbook about the Great Depression they will likely be be using primary sources - newspaper articles, photographs, and firsthand accounts by people who lived through the Great Depression - to inform the textbook they are writing. The textbook therefore represents a secondary source about the Great Depression.
Tertiary sources are summaries and synopsizes of events or topics and their authors may draw upon primary and secondary sources for their creation. An obvious example of a tertiary source would be an encyclopedia article about the Great Depression.
Primary sources in the humanities may include journals or diaries, photographs, newspaper articles, law reports and government documents, and firsthand accounts of events; in the natural, applied, and social sciences, primary sources may also include research reports documenting the findings of original research; in literature and the arts, primary sources may also include poems, plays, stories, original works of art such as paintings or sculptures, originally composed music or original performances.
Secondary sources involve someone else's analysis of events, topics, or findings. Obvious examples include textbooks or books discussing a particular topic and also academic articles in which the work of others is discussed.
Tertiary sources are brief summaries of topics; encyclopedia are the best example of a tertiary source.