Whenever we install Ubuntu on a system with another OS already on our hard drive(s) we will be presented with the following choice:

Choosing to "Replace Windows with Ubuntu" will indeed install Ubuntu on all of your hard disk space. Multiple partitions will be deleted for a default partition layout (usually a root /
partition, and a swap partition).
Therefore we are presented with as warning saying:
This will delete all of your Windows 7 programs, documents, photos, music, and any other files.
So yes, your doubt is justified. You should not choose this option if you still had non-backuped data on your drive, or if you wanted to preserve your Windows partition.
You can install "alongside" of Windows if you had unparitioned space for Ubuntu on your drive, or in case you let the installer do the re-partitioning (i.e. shrinking of the Windows partition) to makes space for Ubuntu.
Still, this procedure though usually safe puts your data at some risk. Therefore we should always make a backup of our valuable data before we do antyhing to our partition, or install a new OS (this is not specific to Ubuntu).
In case we are familiar with partitioning, or we need a partition layout different to default we can proceed with "Something else" as depicted above to make a custom partition layout before installation.
In case we had lost our data during the installation process we may have luck to recover at least some of our data. This is not an easy procedure but it can be done. See