We characterize orbifolds in terms of their sheaves, and show that orbifolds correspond exactly to a specific class of smooth groupoids. As an application, we construct fibered products of orbifolds and prove a change-of-base formula for sheaf cohomology.