A Stefan problem is a free boundary problem where a phase boundary moves as a function of time. In this article, we consider one-dimensional and two-dimensional enthalpy-formulated Stefan problems. The enthalpy formulation has the advantage that the governing equations stay the same, regardless of the material state (liquid or solid). Numerical solutions are obtained by implementing the Godunov method. Our simulation of the temperature distribution and interface position for the one-dimensional Stefan problem is validated against the exact solution, and the method is then applied to the two-dimensional Stefan problem with reference to cryosurgery, where extremely cold temperatures are applied to destroy cancer cells. The temperature distribution and interface position obtained provide important information to control the cryosurgery procedure.