An exposition of second- and higher-order logic and type theory. It includes the syntax and semantics of classical second-order logic and a discussion of higher-order logic based on the concept of a type. Also explored are origins and nature of type theory, its relationship to set theory, and descriptions of contemporary forms of type theory.