Wireless sensor networks(WSNs) are consisting of multifunction sensor nodes that are small in size and communicate wirelessly over short distances. Sensor nodes incorporate properties for sensing the environment, data processing and communication with other sensors. The unique properties of WSNs increase flexibility and reduce user involvement in operational tasks such as in battlefields. WSNs present unique and different challenges compared to traditional networks. In particular, wireless sensor nodes are battery operated, often having limited energy and bandwidth available for communications. Continuous growth in the use of WSNs in sensitive applications, it becomes a requirement to provide security in WSNs. Achieving security in resource constrained WSNs is a challenging research task. In this paper, we outline what is WSN, need for security in WSN, security issues, possible attacks in WSNs, security requirements in WSN and finally security protocols used in WSN and how they are achieved security requirements.