IPSec is a protocol suite that provides security for IP communications by authenticating and encrypting each IP packet. It was created because the original IP protocol lacked security features to prevent spoofing, replay attacks, and ensure confidentiality. IPSec includes protocols like AH, ESP and IKE to provide authentication, integrity, confidentiality, and secure key establishment between network devices. It operates in either transport or tunnel mode and can be configured using IPSec policies to determine when and how to apply security to network traffic.