You would have to be very quick to intercept the message while it is still in the process of sending.
Please note that this is an instant messaging app which uses Wi-fi or a cellular data network.
The way to unsend an iMessage is to quickly put your phone on Airplane mode. Go to the Home Screen and open the Settings app.
Toggle the button next to Airplane mode to switch it on. A small airplane should now appear at the top left hand corner of your screen.
If you were fast enough in putting your phone on Airplane mode, the iMessage should not have been delivered and now you can go ahead and delete it or compose a better message.
Once an iMessage has been delivered, unfortunately you cannot unsend it.
Read also: How to find an iPhone on a PC