How to do an icloud backup on my iPhone?

Ok so, my phone has been having this alert saying that my iphone needs to have an icloud backup. It's saying "to have an icloud backup, your iphone must be plugged in, connected to Wi-Fi, and locked."But what i don't understand is that is has been doing that every night when i go to sleep, so i don't understand why it is not doing it automatically. I think it is because some thing about my iPhone being locked? I don't know. What even is locked?

Never seen that alert before-but I've always had it on. Here's the basic setup for iCloud settings and the account. Best luck.
http://www.dummies.com/how-to/content/how-to-use-icloud-on-your-iphone-5.html

http://www.wikihow.com/Set-Up-iCloud-on-the-iPhone-or-iPad