How underwriting works: the roles of underwriters, firm commitment and best efforts deals, bookbuilding, fees, stabilization, and the rules behind each step.