Sonic Megamix is a fan-made remake of the original Sonic the Hedgehog, and the download links are collected on Sonic Retro's wiki page for the project: https://info.sonicretro.org/Sonic_Megamix#Downloads.
Every version is listed there with its own link. Version 4.0 is the one most people recommend — it is the most complete build, with the roster and zone selection finished, while earlier releases are historically interesting but rough.
You will need an emulator to play it, since it is distributed as a ROM modification rather than a standalone program, and you must own the original game to use it legally.