If your masthead is like mine (original E32 / Kenyon spar) there will be pins that go through the masthead from one side. the pins are held in place by an oval-shaped flange that holds them in place.
Unscrew the screw that holds the flange to the side of the mast, and you can pull the pin out.
What worked for me (before pulling any pins) was to work a length of tagline or small cord around the sheave and pull it tight so you have sort of a "leash" to hold onto the sheave, because once the pin is out the sheave is free to move and can fall farther into the masthead. That's a headache you want to avoid. I put a "leash" like that on each of the four sheaves before pulling any of the pins, and used it to guide each sheave in turn out of the front of the sheave-box. If there is a halyard-guard bolted to the front of the masthead, you'll have to remove it to get the sheaves out.
That "leash" is super-helpful for maneuvering the sheaves back into place when it is time to put the pins back in.
On my masthead there were three pins: one for the main-halyard sheave, one for the jib/centerline halyard, and then one that is shared by the two spinnaker/wing halyards.
Hope that helps
Bruce