In general, the term packet applies to any message formatted as a packet for reliable service, i.e When a message is delivered with IP (Network Layer) + TCP (Transport Layer) Protocols then the Protocol data unit at Layer 3 is called an IP PACKET.
Note:- A “reliable” service is one that notifies the user if delivery fails.
The term IP datagram is reserved for packets of an “unreliable” service on Layer 3 of OSI reference model. When a message is delivered with IP (Network Layer) + UDP (Transport Layer) protocols then the Protocol Data Unit at Layer 3 is called an IP Datagram.Note:- “unreliable” Service or Protocol does not notify the user if delivery fails.
IP + TCP = IP Packet
IP + UDP = IP Datagram