Impact craters are potentially powerful tools for probing large-scale structure beneath planetary surfaces. However, the details of how target structure affects the impact cratering process and final crater forms remain poorly understood. Here, we present a study of cratering in layered surfaces using numerical simulations. We implement the rheologic model for geologic materials described by Collins et al. (2004) into the shock physics code CTH; this model includes pressure, temperature, and damage effects on strength as well the option to include acoustic fluidization. The model produces reasonable final crater shapes and damaged zones from laboratory to planetary scales. We show the effects of varying material strength parameters and discuss choosing appropriate strength parameters for laboratory and planetary situations. Results for cratering into idealized terrains with layers of differing material strength are presented. The presence of such layers in the target can significantly alter the ejecta curtain structure and the final crater morphology. Finally, we reproduce the morphologic variations that are observed in small lunar craters by modeling a weak regolith overlying competent rock.