If you and the other party are on cloud-enabled devices, the message might be delivered automatically, but if you're not using a cloud-enabled device, the message is saved locally on your machine and it will be delivered when both you and your friend will be online at the same time. Check the Support page for further information.