Main function of SSL(secure socket layer) is to provide secure communication between client and webserver. In normal case without communication all data transfer b/w a user using a website is remain unencrypted.
So anyone can intercept those packets and extract information. This information will include credit card details and personal information. So it is very necessary to use encrypted communication b/w user and web server.
How do we Know data transmitted over a network is secure?
Every users using internet is need to know that most of the data transmitted over the network is not secure and can hijacked by anyone. So how we do we know which websites is secure or having ssl security. Well there is a simple solution for this, look at the url of the website if it is https then we can make sure that the data transmitted is secure. If it is http the data send to that website is not secure and can hijack by anyone.