iPhone data is automatically backed up when you make sure to enable iCloud. To do this you simply go to Settings >iCloud>Backup & Storage and make sure it is set to enabled. From that point, iCloud will backup daily when your iPhone is connected to the internet, screen locked and connected to whatever power source you use to recharge your iPhone. When in doubt, you can also back up manually by making sure your device is connected to the internet and choosing Settings>iCloud>Storage & Backup. From that point, choose “Back Up Now” and iCloud will do the rest.
It is important to note that only purchased music, movies, TV shows, apps and books get unlimited free storage at iCloud. This service isn’t available for backing up music from your iPhone in all countries. If you are outside of North America, you may want to check to see what is available. Also movies and TV shows are only available for backup in the United States. Other data such as photos, videos, device settings, app data, home screen, app organization, messages, ringtones and visual voicemails have five GB of free storage available. In order to not go over that limit, you can select which applications get backed up and which ones should be left alone. Then, you can purchase more space if you need it. To check how much space is being used you can go to your Home Screen>Settings>iCloud>Manage Storage>Select device you want to manage>iPhone Info Screen.
Data that is not backed up to iCloud includes purchases of music, movies or TV Shows, or music synced from your computer to your iPhone. In order to make sure that information is backed up, use iTunes. While iTunes does offer automatic backups, this option is disabled every time the iCloud backup is turned on, so you need to make sure that it is enabled in order to make sure backups are completed. To do this, go to Devices>iTunes and choose Back Up. You can also backup your data by iTunes by connecting your iPhone to your computer and going to your iTunes application. Your iPhone should show up in the left hand navigation in the iTunes on your computer. You can click on that and choose to backup the data from your iPhone. iTunes will confirm the backup by adding the date and time of the last backup.
Resource: Apple Support