ICMP is used to pass control information between hosts. For example, the information can be sent in any of the following situations:
ICMP provides feedback about problems in the communication environment; it does not make IP reliable. The use of ICMP does not guarantee that an IP packet will be delivered reliably or that an ICMP message will be returned to the source host when an IP packet is not delivered or is incorrectly delivered.
Raw sockets can use ICMP and, like IP, ICMP is not typically used by application programs directly.