This question already has an answer here:
I'm trying to learn linux, so I installed ubuntu onto a 64 gigabyte USB and restarted my computer and booted from the usb. When it was loaded it asked me if I wanted to "try without installing"(which is kind of like a trial right?). The second option was to "install ubuntu". I clicked this option and it said "no operating systems detected", so I assumed it would install onto the USB since I don't have windows or any other operating system on the USB stick. When it was all done I rebooted my computer and tried booting windows but it had been completely overwritten. I unplugged the USB stick with ubuntu on it and ubuntu had been installed onto my main HDD from the USB stick.
Luckily, I have recovery USB sticks that lenovo sent me, so when I get back to college I'll be able to recover windows, but I want to know what I did wrong, and what I need to do next time, so that I can learn from my mistake.