If a contact is offline, your message might be delivered instantly (if you and the other party are on cloud-enabled devices). If neither party is on a cloud-enabled device, the message is saved locally (on your device) and will be delivered as soon as both you and the recipient of your message are online at the same time.
Learn more about the cloud .