Since you are getting a ?-mark folder trying to boot up your Mac it appears the partitions have gotten messed up unfortunately.
Usually this will be from having selected during Windows Setup the wrong partition (i.e. not selecting the "BOOTCAMP" partition) to install Windows to. The question is what to do now:
- Do you have a Time Machine backup by any chance made onto an external USB drive?
- Do you strongly care about the data you had on your iMac, or is wiping everything and starting fresh an acceptable option?
- If you press COMMAND-R does that take you into the macOS "Utilities Menu" (Recovery Mode) with a 4 options listed there? If not, you will need to press OPTION-COMMAND-R to boot into Internet Recovery Mode. Does Internet Recovery Mode take you into the "Utilities Menu"?
If you boot into Internet Recovery Mode, go into Disk Utility, and click on each of your drives listed on the left-hand side and take a photograph of the information on the right-hand side of the window and post those photos here that would help.
Ultimately though, unless recovering data is a top-priority, you are probably going to have to erase the whole system and rebuild reinstall macOS.