This can come as part of other tools, such as CDN, but the optimisation side is down to website software that compresses your images when you load them on the site, or in bulk.
In Bulk, you may install the software and run it to do them all, and it takes as long as it takes.
But what is it? Think of it like reducing the file size of an image, while retaining the quality and physical size, whilst updating the image so Google recognises it as “optimised”. You could optimise it in Photoshop, but Google will still not see it as “optimised”. So software does this for you, at a cost.
Any Page Speed test will tell you if it is optimised or not. Or get in touch and we can check for you.