I currently have mac os x 10.7.3 , I did download OS X El Capitan but did not install it, I'm afraid of losing data. So will I really lose data if I install it? And if so, is there a way to upgrade my mac os without losing data? And thank you so much.
Normally, installing an updated version of MacOS should not cause any data loss. If you launch the installer app downloaded from the Mac App Store, then the new OS is installed leaving all your existing apps and data in place.
However, you should ALWAYS have a backup to mitigate the loss of any data. Things can go wrong; disks can fail; hardware can get stolen, catch fire, drenched with water, etc, etc.
There are a large number of posts here from people who have accidentally lost their data while trying to do something. These exist as warnings.
Files without a backup are waiting to be lost.