A primary source is original research. Primary sources serve as roots from which all other documents must refer back to. Consequently, primary sources are published or created before secondary sources.
Keep in mind that primary sources include both published and unpublished items.
A secondary source is information based on original research (primary sources). Secondary sources may comment, analyze, summarize, review, and discuss the findings of original research. Consequently, secondary sources are published or created only after primary sources.