If you received a photo or video as an attachment to a text message, you can save it on your phone. In the message, just touch & hold the attachment to save it. For some attachments, you must touch & hold the blank space beside the attachment.
To view the saved photo or video:
If you do not save a photo or video from a message, it is kept within the message only. So, if you delete the message, you also delete the attachment. (You can try to recover recently deleted messages.)