How IPO Premiums are decided.,,?

I need to know how IPO prices are listed In premium or at discount, Does company get to know their listing price prior to debute or only for NSE or BSE would be knowing and on what basis the price is fixed.