I purchased a 2008 Mac from a friend. It's now formatted and internet recovery option is not working for a fresh install. I want to create a bootable USB drive in a Windows machine. I am unable to download El Capitan without the Mac App Store. How do I install a fresh copy?
I doubt you'll be able to do this. Even if you could find a URL to the OS installer app outside of the App Store, you can't run the installer in a Windows environment.
2008 Macs didn't have Internet Recovery. However, it's usualy for them to have a Recovery Partition on the internal drive, which you can access by restarting while holding Command and R.
Did your friend sell you the Mac without an OS on the drive? I'd go back to him, if he has another Mac, and see if he can help.
You can still buy OS X Snow Leopard (10.6) from Apple on a DVD. It's about US$20.
Getting a bootable installer on windows (in a legal way) isn't possible. But there exist other solutions:
A recovery disc was included with macs in 2008, maybe your friend still has it, you could use that to install macOS. When running you can update to Mojave.
Someone elses mac
If you know someone else with a mac you could use that to create a bootable installer USB.
Buy a recovery disc
Apple still offers Snow Leopard on a disc, you could install from there and update to macOS Mojave. Find it here (links to Dutch website, but should also be available for your region).