It’s not extracted it’s combined with labour to produce higher output than labour or capital on their own.
For example a worker with a shovel could only dig a small hole a day, but with the injection of capital (ie a backhoe) they can dig many more holes. The worker can increase their pay compared to what they would’ve made with just a shovel and the person that provided the backhoe can also generate a healthy return for their capital contribution.