The details are a bit sketchy, but maybe these tips will help.
Make sure your RAM is seated securely.
Make sure your system fans are running as expected.
Try running the laptop just using the power adapter without the battery installed.
If you can find any patterns, they can be a big help in determining the issue. For example, if the machine tends to run fine in the morning and tends to have issues after running for a while, that may indicate a heat related failure.
You mention that sometimes the machine starts normally. When it starts normally, does it run without issue until you attempt to reboot it? When it does run into issues, do you just reboot it until it works correctly, or do you have to turn it off for a while?