jQuery is written entirely in Javascript. It runs using whatever Javascript engine is in the browser that runs it, so if you run it in IE, it uses IE's engine. In Firefox it uses the Firefox engine.
Basically it's just an API built around the semi-standard Javascript API every browser complies to. It takes any quirks between browsers into account and smooths them out (internally) for you so that everything works the same regardless of browser when you develop within the framework.
It follows the ECMA spec only as much as every browser allows.