This is made possible using a VM Computers mod for the game. The mod makes it so that Minecraft players can order computer parts from an in-game satellite. Players then use the parts to build a computer that can boot a variety of other operating systems, not just Windows 95.
The mod itself, on the other hand, uses VirtualBox, a free and open source virtualiser software for x86 hardware. Using it in Minecraft involves putting a PC case block down, and then using to create a virtual hard drive. The installation of the operating system is then done via ISO files. No doubt getting Windows 95 and Doom to run on unconventional platforms is quite the modder’s challenge. It can also be a fun distraction if you’re a fan of Minecraft, but have started feeling burnt out due to playing it too much. But beyond that, there should be better ways for you to play the original Doom. Or Minecraft itself even, for that matter (Source: Reddit, VirtualBox via The Verge)