Mobile Ad hoc NETwork (MANET) is a self-organizing, self-configuring wireless network consisting of mobile nodes. It does not require any centralized access point. There is no need for any fixed infrastructure for nodes to communicate between themselves. MANET is vulnerable to various attacks due to lack of centralized monitoring and regular changing topologies. Security has become one of the challenging issues to protect MANET from various malicious attacks and provide protected communication between nodes. In this paper, a study made on different methods that have designed to detect and prevent black and gray hole attack in MANET.