Hi
sorry to hear your Mac is not Booting up as expected
Sounds like it could be a Graphic or Ram issue
Have you upgraded or installed additional Ram
link explains the startup process for a Mac
About the screens you see when your Mac starts up - Apple Support
Do the Following
1. Shut Down Mac
2. Remove Power cord & usb connections
3.reconnect power cord after 30 seconds
4.reconnnect any essential usb devices (keyboard - Mouse)
5.when booting up
6. immediately after you press power button
7. press and hold , alt , command , P & R keys
8.only release after you hear startup sound for a second time
The about reset the (SMC) System Management controller and (PRAM)
below links explain
https://support.apple.com/en-ie/HT201295
OS X Yosemite: Reset your computer’s PRAM
Regards