I don't know what's inside one but I imagine it's just a few diodes and MOSFETS.
Mosfets? No, that's unlikely.
SSR's are for AC loads and though therefore have an AC component like a TRIAC (which is a bi-directional Thyristor/SCR). It would also have an opto-coupler and some snubbing passive components along with (in the good ones) some zero-crossing based gate control.
Making your own would likely cost more than buying a ready made one... but people do it. IE, Buy MOC3010 (or MOC3024) for opto-coupler, a ON SEMI Part # T2800DG and find some sample Triac/SSR circuits... like...