Most have an Allen head screw to lock them on the shaft. You need to loosen that screw if it has one.
If the old engine crankshaft is rusty, it will have to be sanded down to clean metal. From there soak it with PB blaster and then tap it lightly with a hammer a drift punch close to the crankshaft area. It may take some time and repeat effort, but it will break free eventually.
Do not hammer on the "V" portion of the pulley.