Vortices in superconductors are tubes of magnetic flux, or equivalently, cylindrical current loops, that penetrate into a material sample. Knowledge about the structure and dynamics of collections of vortices is of importance both to the understanding of the basic physics of superconductors and to the design of devices. We first discuss homogeneous isotropic superconductors that can be modelled by the Ginzburg–Landau theory. We then discuss variants of this model that can account for inhomogenieties and anisotropies due to impurities, thickness variations, and thermal fluctuations. These all effect changes in the vortex state, as do changes in the applied magnetic field and current strengths and directions. Through computational simulations, we use the various models to illustrate these changes. In particular, we examine the pinning of vortices by thickness variations in thin–films, by impurities and by grain boundaries, the effects that changes in the thickness of a simple Josephson junction have on the structure of the vortex state, transitions that occur in the vortex state as the applied magnetic field is increased, and distortions of that state due to thermal fluctuations.