1. You need to shut off the water to that faucet before you do anything. That's pretty obvious, but it's important that you know this. There should be a pair of shut off valves somewhere to shut the hot and cold water off to the bathroom so that you can do plumbing repairs like this.
2. The "cartridge" consists of that hex nut thingy and the "spindle" inside it that you turn with the faucet handle. Consequently, that hex nut thingy has both an exterior male thread (by which you screw the cartridge into the faucet body) and an internal female thread by which the spindle moves forward and back (when turned with the faucet knob) so that it controls the flow of water out of the tub spout.
KOK is right that you need to replace that cartridge (aka: "hex nut") by turning it counter clockwise, just like a light bulb. However, it'd be best to:
A) shut off the water to the faucet, then
B) open the faucet a turn or two with the handle you've removed, and THEN
C) turn that hex nut counter clockwise.
The reason why you want to open the faucet before turning the hex nut is because of the fact that it has both an exterior male thread and an interior female thread. Those two threads have a different "pitch" and so they each want that hex nut thingy to move a different distance as you turn it, and that will cause the hex nut thingy to "jam" or "bind" as soon as you start to turn it (if you don't open the faucet first).
You might expect that shouldn't be a problem since the spindle inside the hex nut should turn with the hex nut, and it would if you open the faucet first. But, right now the washer at the opposite end of that spindle is pressed tightly against the seat inside the faucet, and friction between the rubber washer and the seat will prevent the spindle from turning with the hex nut thingy. So, when you try to turn the hex nut, it wants to back out one distance according to the male threads on it's outside, and a different distance according to the female threads on it's inside, and that causes it to just jam up. (and using more penetrating oil on it won't help at all because that's not what the problem is).
So, open the faucet a turn or two before you try to turn that hex nut, and do the same if that hex nut start to jam when you're unscrewing it.
3. I think you should look on the covers and knobs you've removed to see if you can find the name of the manufacturer of your faucet. That's what the guy at the hardware store is going to want to know in order to give you the correct replacement cartridge. However, if you don't know what kind of tub faucet you have, I'd suggest going to:
Kissler & Co. Inc. - Value, Selection, Service since 1923
and downloading their "Faucet Parts" catalogue and looking through the cartridges in there to see which one(s) looks like yours, and then confirm you can buy those same cartridges from your local hardware store or home center.