When Twilio receives an MMS on your Twilio number, it makes a synchronous HTTP request to the message request URL configured for that number, and it expects to receive TwiML in response. In addition to the regular SMS parameters, the "MediaContentType" and "MediaUrl" parameters will also be sent.
You can use the Programmable Messaging API to receive and download images from any media message you receive. Since there can be up to 10 images in one MMS, the "MediaUrl" parameter is structured as "MediaUrl0", "MediaUrl1" , "MediaUrl2" and etc.
In PHP, for example, you can use:
$_REQUEST['MediaUrl0']
to retrieve the first image.
For more code snippets, check out the documentation here.