How to calculate the VaR ( Value at risk)?

Risk management: How to calculate the VaR ( Value at risk) and what is its use?