The Shuttle had five AP-101 general purpose computers. As discussed in this question, the system was redundant and there was a voting process to eliminate a computer whose results disagreed with the others. What was anticipated to cause a computer to disagree with the others?
We can look at what caused these problems over the long history of the Shuttle program. These GPC failures come to mind:
On STS-9, two GPCs failed independently late in the mission and were voted out of the redundant set. Post-flight analysis showed that these failures were due to loose solder debris in the computers that moved about when reaction control jets were fired and shorted out components.
On STS-135, a GPC failed on Flight Day 3 due to a "switch tease" (unexpected sequence of contacts making or breaking during switch actuation) and was voted out. Another GPC failed later in the mission due to a suspected Single Event Upset (radiation caused). Since this GPC was not running in a redundant set, but was running standalone in Systems Management mode, it did not get voted out.
During a drop test of shuttle Enterprise, a faulty solder joint caused a GPC to fail and be voted out just as the vehicle separated from the carrier 747. Prior to this flight, a different GPC had failed during preflight checkout with a parity error.
I know that along with typical hardware failure protection that you would see in your everyday desktop, any hardware going into space has to deal with a good deal more radiation. This can cause random failures based on where the radiation hits that can cause bit flips and crashes. SpaceX does something similar with their flight computers where they use cheap off the shelf hardware (i.e. not radiation hardened), and then make up for it with large strings of computers error checking each other.