Tracking back its origin is the early nineties; the subject of wireless sensor networks (WSNs) has seen a remarkable growth and interest in both academia and industry. WSNs are already being used to monitor large geographic areas for modeling and forecasting, environmental pollution and flooding, controlling usage of water, fertilizers, and pesticides to improve crop health and quantity. WSNs, can be considered as a special breed of wireless ad-hoc networks with reduced or no mobility. These networks combine wireless communication and minimal on-board computation facilities with sensing and monitoring of physical and environmental phenomena. Much work has been reported on different aspects of WSNs; however, much of this work focuses on a specific area. In this context, this article contributes a general survey on WSNs. We believe this work will assist researchers to develop sound introductory background knowledge and understanding of WSNs.