Use groove-joint pliers to grip the old cartridge and pull it straight up. Be careful not to break or damage either piece. If the pliers won't work, buy a tool called a stem puller that was made for your brand of faucet.
Clean the faucet and the faucet body to remove debris.