Update a single site at a time. Choose sites at random to ensure no bias (in most cases, this is not really necessary, and a simple contiguous loop over lattice sites is sufficient).
A loop over all sites is referred to as one Metropolis sweep (or iteration).
The probabilistic part of the algorithm is done using a random number generator (hence the name -- Monte Carlo -- in reference to games of chance). Generate a random floating point number r in [0,1). A process with probability p is performed if r < p.
The Metropolis algorithm is very simple to program.