The role of the project manager in understanding and dealing with risks

What is risk management, and what’s the role of the project manager in understanding and dealing with risks? When in the project does risk assessment happen? What about risk mitigation and risk management?