Could you clarify what you mean by "then switched off again" ?
Do you mean actually turning off ? Or do you mean resetting to a black screen ... perhaps with a "system disk not found" message (or similar).
If the former, then its pretty clear its likely to be a hardware fault of some description beyond hard drive issues, since hard drive issues don't cause a computer to turn itself off.