We show how the directed-loop Monte Carlo algorithm can be applied to study vertex models. The algorithm is employed to calculate the arrow polarization in the six-vertex model with the domain wall boundary conditions (DWBC). The model exhibits spatially separated ordered and ``disordered regions. We show how the boundary between these regions depends on parameters of the model. We give some predictions on the behavior of the polarization in the thermodynamic limit and discuss the relation to the Arctic Circle theorem.