Context : The exploitation of clusters of galaxies as cosmological probes relies on accurate measurements of their total gravitating mass . X-ray observations provide a powerful means of probing the total mass distribution in galaxy clusters , but might be affected by observational biases and rely on simplistic assumptions originating from our limited understanding of the intracluster medium physics . Aims : This paper is aimed at elucidating the reliability of X-ray total mass estimates in clusters of galaxies by properly disentangling various biases of both observational and physical origin . Methods : We use N-body/SPH simulation of a large sample of \sim 100 galaxy clusters and investigate total mass biases by comparing the mass reconstructed adopting an observational-like approach with the true mass in the simulations . X-ray surface brightness and temperature profiles extracted from the simulations are fitted with different models and adopting different radial fitting ranges in order to investigate modeling and extrapolation biases . Different theoretical definitions of gas temperature are used to investigate the effect of spectroscopic temperatures and a power ratio analysis of the surface brightness maps allows us to assess the dependence of the mass bias on cluster dynamical state . Moreover , we perform a study on the reliability of hydrostatic and hydrodynamical equilibrium mass estimates using the full three-dimensional information in the simulation . Results : A model with a low degree of sophistication such as the polytropic \beta -model can introduce , in comparison with a more adequate model , an additional mass underestimate of the order of \sim 10 \% at r _ { \mathrm { 500 } } and \sim 15 \% at r _ { \mathrm { 200 } } . Underestimates due to extrapolation alone are at most of the order of \sim 10 \% on average , but can be as large as \sim 50 \% for individual objects . Masses are on average biased lower for disturbed clusters than for relaxed ones and the scatter of the bias rapidly increases with increasingly disturbed dynamical state . The bias originating from spectroscopic temperatures alone is of the order of 10 \% at all radii for the whole numerical sample , but strongly depends on both dynamical state and cluster mass . From the full three dimensional information in the simulations we find that the hydrostatic equilibrium assumption yields masses underestimated by \sim 10 - 15 \% and that masses computed by means of the hydrodynamical estimator are unbiased . Finally , we show that there is excellent agreement between our findings , results from similar analyses based on both Eulerian and Lagrangian simulations , and recent observational work based on the comparison between X-ray and gravitational lensing mass estimates . Conclusions :