When confined to curved surfaces or to bounded volumes, ordered materials often experience geometric frustration, where the order cannot be satisfied everywhere on the surface or in the volume. This frustration induces unavoidable distortions in the material, possibly resulting in the generation of one or more defects in the order. In this thesis, we focus on materials with nematic order and investigate the role of geometry in the interplay between order and confinement. We first consider a nematic confined to the surface of a toroidal droplet. The nematic is active such that the individual particles do work on their surroundings. This activity results in a nematic that spontaneously undergoes creation and annihilation of opposite-signed pairs of topological defects; these defects continually move and explore the surface of the torus. Despite the activity, we find that the defects couple to the underlying curvature of the surface: on average, the positive defects migrate towards the outside of the torus, where the Gaussian curvature is positive, and the negative defects migrate towards the inside of the torus, where Gaussian curvature is negative. When we compare our results to equilibrium predictions as well as to computer simulations of our active nematic, we find that adding activity to order resembles bringing an equilibrium system to high temperature; that is, activity plays the role of thermal fluctuations in driving the defects to explore configuration space. There are, however, significant differences with equilibrium nematics that bring richness to the problem. We next consider a nematic liquid crystal (NLC) confined to toroidal droplets with homeotropic anchoring. We find a twisted equilibrium configuration, where the nematic spontaneously develops chirality and the amount of twist depends on the ratio of the torus ring and tube radii. Experiments with a NLC confined to straight and bent cylindrical capillaries under similar conditions reveal that the twist is a response to the additional curvature that arises when bending a cylinder into a torus. Lastly, we consider a NLC confined to a capillary bridge under homeotropic anchoring such that the topology requires the presence of a defect in the bulk. We perform experiments with waist-shaped and barrel-shaped bridges and find that waist-shaped bridges contain hyperbolic defects while barrel-shaped bridges contain radial defects. In addition, we find that the ratio of the bridge height to its width determines whether the defect is a ring defect or a point defect. Overall, our results illustrate the variety of ways curvature affects nematic order: it can control defect type, defect location, and can even tune specific distortions in the order.