A man-in-the-middle attack refers to a type of cyber attack where an unauthorised third party intercepts a communication channel that is perceived to be secure by the two legitimate parties involved in the communication.
A potential instance of a man-in-the-middle attack could transpire in the event that an unauthorised individual intercepts and alters an IP packet during its transmission from a client to a server.
The primary threat that encryption and HTTPS aim to mitigate is the Man-in-the-Middle (MITM) attack.