It is well known that a wide class of obstacle and unilateral problems can be studied in the unified framework of variational inequalities. Using the penalty function method, the variational inequalities are characterized by a system of boundary value problems in conjunction with the known obstacle. We use the variational iteration method for solving the system of boundary value problems associated with the obstacle problems. Several examples of second, third, fourth and fifth-orders system of boundary value problems are given to illustrate the efficiency and implementation of the variational iteration method. Comparison with the homotopy perturbation technique demonstrates that the variational iteration technique performs better.