Generally in the UK, the MPhil is seen as a senior level research qualification just above the MRes and below the PhD - at least in computer science. I do not agree that an MPhil is necessarily a failed PhD as there can be many reasons why a candidate cannot produce a full PhD thesis ranging from company support, time and funding to personal circumstances. A PhD fail to me is someone who has done a PhD thesis and failed the PhD viva and failed to get at least major corrections or a recommendation for resubmission in 12 months.
This was true in my case that I was transferred from PhD to MPhil, albeit my situation was rather difficult; I was in a PhD route for 3.5 years full time at Lancaster University and the sponsor company (a major water utility company) stopped communicating with me and my supervisor. As a result, my prototype was left untested in a real world scenario which was necessary for my PhD work as there is a requirement in producing innovative and original work. After a year of starting my PhD, I had a supervisor change resulting in a research area change resulting in a late panel 2 years down the line which didn't help either. The panel is a useful tool to know if you are being guided in the correct path and to know if you are getting along well with your supervisor as well as to see if you are producing work that is up to PhD/MPhil standard. If your work is not up to MPhil standard, they can altogether cancel your registration and you are out.
I can't stress this enough; you should have your panel early in your PhD and never late. In my case, it was given late due to a supervisor change and that "I fell through the cracks of the system" and nothing could be done other than to make a formal complaint which I have already.
The panel concluded that I had enough work to do a PhD and decided to change my route from PhD to MPhil on the premise that I was running out of time and no funding available for me (I only had 6 months left of funding, but due to other circumstances, this went well beyond my defence and upto summer 2017 surviving on a TA salary which was less than £5000 pa). This was compounded with fears that I might leave with nothing. They did say that if got the MPhil, then perhaps I could use this as a stepping stone to a PhD and upgrade my work.
It took me 5 years to complete my "over bloated" MPhil and I decided not to pursue the PhD in my area due to difficulties with my current supervision - it is another long story. I feel I do have enough research skills to carry out research in other areas which are of interest to me.
To clarify whether the MPhil has any classes: no, it doesn't. It is purely research unless you are doing a professional Doctorate which have taught components with research. The MPhil is research work done at the same quality and academic rigour of a PhD, albeit shorter in length - hence why the MPhil is seen as a higher degree than an MSc by Research. The MPhil used to be the gold standard during the 60's and 70's for lectureships until requirements increased to have a PhD under your belt.
Which is considered "more academic" or "more prestigious?"
From the Masters degrees, the MPhil as it is the highest Masters qualification that you can get before embarking on a PhD. I know people in my area who haven't got a PhD but have an MEng and produced academic output equivalent to that of a Professor with a PhD. Having research output and published by top ranking publishers is more prestigious in my opinion.
"Which one is better for a PhD?"
It depends on which subject you are studying; in computer science, you only need a BSc honours with a first class honours to enter the PhD route directly without requiring an MSc. Having an MRes or even better, an MPhil in a related area, would considerably boost your chances in succeeding. Other subjects like psychology would require an MRes to enter the PhD route depending on research areas.