The source is the stock exchange.
Primary market is where companies, governments and local authorites raise money.
Secondary market is where the securities and bonds (from the primary market) are traded between other individuals and institutions.
The primary market was the first part of stock markets and the secondary market developed from that.