The difference btw the three is only in the various terminologies . When the data is at the application layer it is referred as message.
Now the application layer passes the message to the transport layer . At the transport layer the term that we use is segment. If the transport protocol is TCP, the unit of data sent from TCP to network layer is called Segment.
Packet is a term which is also used at the transport layer .It is a more generic term used either transport layer or network layer. TCP Packet, UDP Packet, IP Packet etc.(Sometimes packet is also used at layer 3).
Moving on to the Network Layer .. At the network layer the term Datagram is used usually.
At the Data Link Layer the term Frame is used.Frame is the physical level representation of data.
At the physical layer we use Single protocol Data Unit(IPDU).