The Monge-Ampµere equation and its geometric applications