In the primary market, new shares are issued for companies to directly raise capital and facilitate capital formation. Conversely, the secondary market facilitates the resale of existing shares, allowing investors to trade with each other and thereby adding liquidity.