This will normally happen if your Nokia (Microsoft) Lumia has ran into a ROM glitch. What you will have to do is to try the following before you possibly go on to flash the Lumia 520 using either the Nokia Recovery Tool or the Phoenix Service Software (the latter let you do the flashing oflline).
1. Power off your phone preferably by removing the battery and re-installing it again
2. Press and hold the Volume Down button and connect your charger or USB cable (while the Volume Down button is held down) - in about 8 seconds, you should get and exclamation mark (!). After getting this exclamation mark, quickly press the following keys in order
- Volume Up button
- Volume Down button
- Power button
- Volume Down button
The reset process (resembled by spinning gears) should commerce and complete in about 20 minutes. You will sadly have to go on to flashing a fresh ROM to your Nokia Lumia 520 using the either the Phoenix Service Softtware or the Nokia Recovery Tool should these issues persist.