Assuming not a gold razor. . . .
1. Open up & put in a waterproof container with a dash of fairy. Pour boiling water over. Leave to sit for 24 hours.
2. Get an old toothbrush and scrub the crud off the razor - depending on result repeat step one.
3. Give it a 20 minute soak in CIF Kitchen foam (AKA Scrubbing bubbles), and toothbrush again.
4. Dip in barbicide
4. Wash down & rinse, & rub to a polish with a soft cloth
I Usually leave it there, but others will take to further extremes.
Be very careful with gold razors. Use cold water, and only a 1-2 minute with CIF.
Of course YMMV