[[WMG: Most of the final act of the movie happens in Red's head.]]
Andy really hanged himself that night in his cell. Red couldn't accept it and deluded himself into believing that Andy had escaped, hence the many loose ends like Andy using the Randall Stevens alias after breaking out and why was Andy so upset when Warden Norton decided not to investigate Thomas' claim despite having a escape tunnel built all along (something that would get him in deep trouble if it was discovered -- breaking out of jail is illegal, even if you were innocent of the charges that put you in there). Neither the warden nor the head guard were arrested, but Red did get the conditional. He hang himself on the same beam Brooks used, and met Andy in the afterlife.
** Too mean-spirited given the overall tone and message of the movie.
[[WMG: Andy really did kill his wife, and Tommy really was making the whole thing up.]]
Andy was much too drunk the night he followed his wife and her lover to their rendezvous point, and the booze, coupled with his own guilt, blacked out the murder in his mind, to the point where he truly believes himself to be innocent. Tommy really did make up the story of the "real killer" and told the warden he would "tell the truth" on the stand, under the belief that helping to get Andy out of prison would win him points with the guys inside. Considering how important Andy was to the warden's money laundering, the warden didn't want to take any chances, and had Tommy shot.
[[WMG: Andy would of never went to jail if Johnnie Cochran was his lawyer.]]
It was all circumstantial evidence at best, and Johnny would ''never'' of allowed his client on the stand.
[[WMG: Andy fought in WW2]]
It fits the movie's time frame. It could also be the reason why his wife had an affair: he was emotionally distant from all the things he had seen, so she abandoned him for another lover.