We collect here results on the existence and stability of weak solutions of complex Monge-Ampere equation proved by applying pluripotential theory methods and obtained in past three decades. First we set the stage introducing basic concepts and theorems of pluripotential theory. Then the Dirichlet problem for the complex Monge-Ampere equation is studied. The main goal is to give possibly detailed description of the nonnegative Borel measures which on the right hand side of the equation give rise to plurisubharmonic solutions satisfying additional requirements such as continuity, boundedness or some weaker ones. In the last part, the methods of pluripotential theory are implemented to prove the existence and stability of weak solutions of the complex Monge-Ampere equation on compact Kahler manifolds. This is a generalization of the Calabi-Yau theorem.