We develop a generalization of the theory of Thom spectra using the language of infinity categories. This treatment exposes the conceptual underpinnings of the Thom spectrum functor: we use a new model of parametrized spectra, and our definition is motivated by the geometric definition of Thom spectra of May-Sigurdsson. For an associative ring spectrum $R$, we associate a Thom spectrum to a map of infinity categories from the infinity groupoid of a space $X$ to the infinity category of free rank one $R$-modules, which we show is a model for $BGL_1 R$; we show that $BGL_1 R$ classifies homotopy sheaves of rank one $R$-modules, which we call $R$-line bundles. We use our $R$-module Thom spectrum to define the twisted $R$-homology and cohomology of an $R$-line bundle over a space $X$, classified by a map from $X$ to $BGL_1 R$, and we recover the generalized theory of orientations in this context. In order to compare this approach to the classical theory, we characterize the Thom spectrum functor axiomatically, from the perspective of Morita theory. An earlier version of this paper was part of arXiv:0810.4535.