Mathematical models have been used to understand the factors that govern infectious disease progression in viral infections. Here we focus on hepatitis B virus (HBV) dynamics during the acute stages of the infection and analyze the immune mechanisms responsible for viral clearance. We start by presenting the basic model used to interpret HBV therapy studies conducted in chronically infected patients. We then introduce additional models to study acute infection where immune responses presumably play an important role in determining whether the infection will be cleared or become chronic. We add complexity incrementally and explain each step of the modeling process. Finally, we validate the model against experimental data to determine how well it represents the biological system and, consequently, how useful are its predictions. In particular, we find that a cell-mediated immune response plays an important role in controlling the virus after the peak in viral load.