Two versions offered at http://www.autozone.com/autozone/parts/Duralast-Door-Jamb-Switch/2004-Chevrolet-Cavalier/_/N-jlellZ9ciqb?counter=1&itemIdentifier=229378_0_1792_
Maybe you can match the old one, maybe you have to go to a dealer to find out. (The dealer's parts person might even be able to tell you how it's done.)
I don't see anything that screws together on either version. The $23 one looks like it snaps into place from the outside ... and cannot be removed without breaking it (but so what? it's already dead). Tricky part would be to extract the back end (with the wiring) after you break off the front end.
The $7 one also looks like it snaps into place. But maybe (very faint hope) that outer ring (with the two little slots) might be a locking ring. Maybe if you give it a quarter- or half-turn it will loosen the switch body in the hole, and you can carefully pull the switch out ("carefully" so as not to detach the wiring plug). That is, it might work like one of those expanding plastic fasteners that they use to hold things together (e.g., trunk upholstery). Something like c-ring pliers or a sharp needle-nose might work in the little slots.
If not that, then maybe it's accessed by going in behind the door jamb.
As Uncle Turbo already said, get the new one and see how it works. Or go to a salvage yard and play with one there.
Or hope that the problem is merely that the button's slidey part is sticking. Spray some contact cleaner/lubricant on the button and see if it frees up.