Apple is said to be testing the ability to “un-send” an iMessage. While it’s always been possible to delete a message from your iMessage conversation thread, this only ever deletes your own copy of the message, not the sender’s version, which has often led to some confusion among iMessage users.
The ability to retract sent messages is something that’s been available in apps like WhatsApp and Facebook Messenger for a couple of years now, but Apple may have been reluctant to implement it due to the hybrid nature of the Messages app; the app is used to send both iMessages (blue bubbles) and standard SMS messages (green bubbles) and it’s simply not possible to retract an SMS text message at all, so there’s an argument to be made for maintaining consistent user expectations.
Apple’s implementation of the feature, as it stands right now, would include fine print to let both sender and recipient know that a message has been retracted, so you wouldn’t be able to hide the fact that you sent a message at all, but merely take back what you said. It’s not certain right now if there would be a time limit on this.