Cyber attacks are increasing day by day . So network security (to prevent the data from getting theft) is a must. There are various ways to prevent the data from getting stolen and Cryptography is one of them.Cryptography is a way of storing and transmitting the data in a particular form so that only those for whom it is intended can read it and process it.In this paper we will learn about Cryptography, its goals , how it helps in preventing cyber attacks.