What is the difference between the Primary Market and the Secondary Market?

In the primary market, securities are offered to public for subscription for the purpose of raising capital or fund. Secondary market is an equity trading venue in which already existing/pre-issued securities are traded among investors.
The secondary market comprises of broad segments such as Equity, Debt and Derivatives. Equity shares are the most widely traded form of securities. There are various ways in which equity shares are issued such as IPOs, rights issues and bonuses.