I seem to remember them actually rewriting (rendering?) the web page server side, and then sending an optimized mobile friendly version to make it more readable for pages that were originally designed for desktop.
It worked great on my phone and I even used it when the phones were more cabable, because web pages looked better and it saved a lot of bandwidth.
I actually still sometimes use it on iOS! The app is no longer available in most (all?) App Store regions, but I still have it on my account and can redownload it. The servers seem to still be there!
Opera Mini still works today on S60 phones from 2006ish. I regularly see web server log entries from a relative on my private server. But I believe it's a native Symbian app (.sis) not a Midlet. (I have working phones, but I don't have Opera Mini, so I cannot verify)