The black part of the headset cup is indeed, separate to your bike frame, but some new designs are also integrated and part of the bicycle frame itself.
There is a correct tool to remove the headset cups.
https://www.parktool.com/product/head-cup-remover-rt-1
Here is a link to the tool that presses the cups in.
https://www.parktool.com/product/bea...up-press-hhp-2
The links to Parktool is just a visual reference for you, lots of DIY versions. Or depending on where you are located, if there is a bicycle co-op near you, they can teach you how to use those tools and rent them out to you.