Contact phenomena arise in a variety of industrial process and engineering applications. For this reason, contact mechanics has attracted substantial attention from research communities. Mathematical problems from contact mechanics have been studied extensively for over half a century. Effort was initially focused on variational inequality formulations, and in the past ten years considerable effort has been devoted to contact problems in the form of hemivariational inequalities. This article surveys recent development in studies of hemivariational inequalities arising in contact mechanics. We focus on contact problems with elastic and viscoelastic materials, in the framework of linearized strain theory, with a particular emphasis on their numerical analysis. We begin by introducing three representative mathematical models which describe the contact between a deformable body in contact with a foundation, in static, history-dependent and dynamic cases. In weak formulations, the models we consider lead to various forms of hemivariational inequalities in which the unknown is either the displacement or the velocity field. Based on these examples, we introduce and study three abstract hemivariational inequalities for which we present existence and uniqueness results, together with convergence analysis and error estimates for numerical solutions. The results on the abstract hemivariational inequalities are general and can be applied to the study of a variety of problems in contact mechanics; in particular, they are applied to the three representative mathematical models. We present numerical simulation results giving numerical evidence on the theoretically predicted optimal convergence order; we also provide mechanical interpretations of simulation results.