If the red cap got stuck in the machine and you can't remove it, expel all of the steam by pressing down on the cap and then allowing the tank to cool down, while pressing down on the cap turn counter-clockwise.
If this does not work, then it may be that the clutch is stuck and not releasing. In order to free the clutch you should press down firmly and several times try to turn the cap counterclockwise.