This could be if there was a power outage/fluctuation, an app crashed, you ran out of HD space (yes, that’s happened to me, I download… a lot) or if your system libraries are corrupt.
Once the Kernel loads properly, even if there’s a problem with background services like location, the computer will still boot, only in this case those particular background services may not work. This can be reset with a simple reboot. However, if your computer is not booting, but is stuck in a boot loop, then there could be two problems : it could be a kernel issue, or a hardware issue.
To narrow it down, lets take it one step further. During the boot, when the Apple Logo shows up, that means the System has a valid boot device (ie could be your...