Even if you were following the correct steps of installing ubuntu along side with windows,there is a possibility that, at the installation type window, you are shown the whole hard disk instead of the hard drive with windows partition like the figure below.

or if you were trying to install only ubuntu,you may have warned that,

Then you are having this problem that I'm addressing here.
This happens mainly because if you had Windows 8,it is in UEFI mode with gpt partitions, and then if you are reinstalling like Windows 10 in BIOS boot mode, Windows DOES NOT correctly convert from gpt to MBR(msdos). It leaves backup gpt table.
The main problem here is even though you have some gpt left in your hard disk,if you check hard drive from windows (from disk manager's properties or from command prompt) it does not show you that.
