On occasion, an aircraft is cleared for takeoff on one runway, but actually departs from another runway. This has resulted in embarrassment as well as catastrophe. When this occurs, are both the pilot and the air traffic controller at fault? Or is it only the pilot who is at fault?
It depends. There could be any number of reasons for such a mistake, and it is rarely the mistake of any one single person.
Within aviation, we don't really talk about responsibility the way you seem to imply in your question. In many other industries, when a mistake happens, an investigation is initiated with the purpose of finding and punishing the responsible party. In aviation, it is believed that no one makes mistakes on purpose; if a plane takes off from a wrong runway, no one meant for it to happen.
So accident and incident investigation in aviation does not focus on finding someone responsible. Instead, the investigation focuses on figuring out how a similar incident/accident can be prevented in the future. That is why ICAO Annex 13 says:
The sole objective of the investigation of an accident or incident shall be the prevention of accidents and incidents. It is not the purpose of this activity to apportion blame or liability
If someone takes off from another runway than intended, the investigators will not just look at who made the mistake, but rather why the mistake was made. There could be any number of reasons for this. Very often, there are hidden latent threats somewhere in the system.
Maybe the lights at the airport were not sufficient, maybe the signs guiding the aircraft to the runway were misleading, maybe the taxiway layout is confusing, maybe the ground radar was inoperative when it should have been working, maybe the airline had scheduled the crew in a way that imposes fatigue in the cockpit, maybe the procedures are insufficient - I could go on.
The point here is, these potential causes are all things that can be changed in order to prevent the same incident from happening again. You can put up better signs or repair the ground radar, etc. Whereas, if you simple decide that the pilot or controller is to blame and then fire them, without removing the latent threats, then it's more than likely that another pilot or controller will make the same mistake in the future. What are you going to do then - fire them as well?
The whole idea is, instead of focusing on punishing people for their mistakes, if you try to understand what caused them to make those mistakes, you will not only learn much more, but you will also encourage people to report more incidents, that may not otherwise have been reported. We call this Just Culture, and it is all part of the reasons why aviation remains to be one of the safest ways you can possibly travel.
Of course, as with most airplane incidents "it depends". One of the more notable cases of this is Singapore Airlines Flight 006 which due to very low visibility ended up lining up on and subsequently attempting a departure from 05R after being cleared for 05L. In this case it was deemed the crews fault as the tower could not see the aircraft and had no ground monitoring systems.
The most profound example of this is the Tenerife Airport Disaster where confusion in the cockpit on the part of the pilots, the controllers non standard use of "ok" and a buzzing airport environment lead to the deadliest air disaster ever. In this case both the crew's and tower controllers made mistakes and were noted in the reports.