Issue and Explanation: The flashing square with the globe is NetBoot. The machine is looking for a network system folder to boot off. Then you're seeing the Question Mark icon because it couldn't find a suitable volume to boot off. Finally, you're seeing the Happy Mac and the machine is booting because it found a suitable system folder on your internal drive. (That's the way it should be working from the outset, of course.)
Solution: What you'll want to do is go to the Startup Disk control panel and click on the name of your internal drive, so that the machine will know to go to that drive immediately on boot. Verify that the issue has been taken care of by then clicking the Restart button in the control panel.
Some operations performed to a machine (including the installation of clean system software without startup disk reselection, as noted by the other poster) will cause it to no longer look to its internal drive by default, and this is the most likely cause of your problem.
If, after you've reselected your internal drive, you still have problems, then your boot volume is slightly corrupt. I highly recommend
Alsoft Disk Warrior for hard drive repair/optimization. It's the best utility of its kind, in my opinion. But I don't think drive damage is the cause of your problem; I would definitely use the startup disk control panel before going to any other remedy.