The company when requires fund sells the company share to public to raise finds through initial public offer this is also called primary market. The share holder cannot ask for refund once the ipo is allotted
The stock trading includes the stock exchange, broker, depositories and traders. All the activities are regulated by SEBI.
The stock exchange is the place where the brokers can purchase the shares by the orders