The effects of idealized two- and three-dimensional terrain on a cyclonically rotating supercell thunderstorm are studied with a numerical model. The airflow over the terrain produces horizontal heterogeneity in the characteristics of the soundings and hodographs, which, in horizontally homogeneous environments, are the primarily factors that influence storm structure and evolution. Indeed, many of the differences between control simulations that feature storms over flat terrain and simulations in which terrain variations are introduced (e.g., a hill, escarpment, and valley) can be ascribed to differences in the storm environments, especially the thermodynamic conditions (variations in convective inhibition and relative humidity have the biggest effect on the simulated storms), caused by the airflow over and/or around the terrain. Regions of downsloping winds tend to be regions of enhanced convective inhibition and reduced relative humidity. Accordingly, there is a tendency for the simulated supercells to weaken (in terms of the intensities of their updrafts and mesocyclones) in the lee of terrain features where downsloping is present. Though most aspects of convective storm dynamics are independent of the ground-relative winds and only depend on the storm-relative winds, the ground-relative wind profile is of leading-order importance in determining the impact of the underlying terrain on the storms that cross it; the ground-relative wind profile dictates where winds will blow upslope or downslope, which controls to a large extent the manner in which the environment is modified. When three-dimensional terrain is introduced (e.g., an isolated hill, a gap incised into a ridge), the resulting horizontal heterogeneity in the thermodynamic and vertical wind shear fields is considerably more complex than in the case of two-dimensional terrain (e.g., an infinitely long hill, valley, or escarpment). The effect of three-dimensional terrain on the storm environment can be further complicated by the generation of mesoscale vertical vorticity anomalies. In some cases, the interaction of supercells with preexisting lee vorticity anomalies can briefly enhance low-level rotation within the storm; however, the dominant role of three-dimensional terrain generally is its modification of soundings and hodographs, as is the case for two-dimensional terrain.