How do I install Ubuntu without losing data?

I’m a little bit confused about how to install Ubuntu without losing anything on my computer. I want to be able to run Windows as well as Ubuntu, so I have to create a new partition, right? If so can I create a new partition without erasing my harddrive?