In lattice field theories the partition function is often a very high dimensional integral which can’t be written in a closed form. In order to study the behaviour of the system one needs an efficient algorithm to approximate the high dimensional integral. In this thesis two Markov chain Monte Carlo algorithms the Metropolis algorithm and the Worm algorithm are used to simulate the three dimensional xy-model near its critical point. As the critical point is approached from below in terms of the inverse coupling the correlation length of the system diverges which may lead to the critical slowing down. An efficient algorithm is such that it suffers from the critical slowing down as little as possible which corresponds to a small dynamical cri...