An op-amp can be used as a regulator with additional components. It's made of a bunch of transistors so it could be made to imitate a transistor (especially a transistor wired as an amplifier).
Depending on whether an op-amp is voltage-feedback or current-feedback type, all it does is output a voltage (or current) from it's output pin until the voltage at the + input pin equals the voltage at the - input pin. You can use this characteristic to make amplifiers, filters, buffers, "ideal" diodes, regulators, mathematical operations and all sorts of stuff.
To get a 10V output from an op-amp, you have to use a 10V or higher supply, since like a linear regulator, an op-amp's maximum and minimum output is always less (and ideally equal) to the supply voltage.
You need a switching DC-DC converter or charge pump or something to turn your 5V supply into 10V.