This thesis studies the phenomenon of jamming in granular media, such as when a salt shaker gets clogged. We use modern instrumentation, like X-ray synchrotron tomography, to look inside real jamming experiments. High performance computers allow simulating mathematical models of jamming, but we are also able to treat some of them just using paper and pencil. One main part of this thesis consists of an experimental validation of the distinct-element-method (DEM). In this model, grains are modeled separately, their trajectories obey Newton's laws of motion and a model of the contacts between grains is given. Real experiments of jamming of glass beads flowing out of a container were carried out. 3D snapshots of the interior of the media were taken using X-ray synchrotron tomography. These snapshots were computer processed using state of the art image analysis. It was found that 3D DEM is capable of predicting quite well the final positions of the grains of the real experiments. Indeed, in cases of instant jamming (jamming without a substantial previous flow of beads) the simulations agree well with the real experiments. However, in cases of non instant jamming, because of chaotic behavior of the model and the system, the results do not agree. Furthermore, a sensitivity analysis to grain location and size perturbations was carried out. In a second part, we describe results on 2D DEM simulations of jamming in a hopper. We focus on the jamming probability J, the average time T before jamming and the average number ψ of beads falling through the hole when jamming occurs. These quantities were related to global parameters such as the number of grains, the hole size, the friction coefficient, grain length or the angle of the hopper (in opposition to fine-scale parameters that are the positions and radii of the grains). In agreement with intuition, a monotonic behavior of J and ψ as a function of the number of grains, the hole size, the friction coefficient was found. However, surprising results were also found such as the non-monotonicity of the average number of beads falling through the hole when jamming occurs as a function of the grain length and the hopper angle. In the third part, we study simple probabilistic 2D models called SPM, in which non-interacting particles move with constant speed towards the center of a circular sector. Formulas giving the jamming probability or the average time before jamming when jamming occurs as a function of global parameters were found. SPM and 2D DEM were compared and a locally good correspondence between the global parameters of the two was established. SPM led us to study some combinatorial problems, in particular two bi-indexed recurrence sequences. One gives the number of ways of placing identical balls in fixed-size numbered urns and the other the number of subsets of a given ordered set without a certain number of consecutive elements. Several different ways of computing the sequences, each advantageous in certain cases, were found.