How it works is just like Photoshop expect you don't necessarily need PS. This is how all so called plug-in's for Aperture, LR and other Raw converters operate, they build a rendered pixel based image and apply the filter, just as they would do in Photoshop. Its NOT happening in the Raw processing engine using metadata instructions.
The only Raw converter I know of that actually applies a few 3rd party plug-in's directly within the Raw engine is Bibble. Using NoiseNinji, its actually doing this in the Raw processing engine, not on some rendered image, making it truly non destructive and providing all the advantages of the Raw engine (high bit, wide gamut, linear encoding, non destructive etc).