(a) Taking the hotel staff's room. I was persistent, firm, and polite with proof that I had paid. We had to wait an hour to check in as they cleaned the room. I assume two staff members just shared a room for the couple of nights we were there.
(b) Taking a room that they normally don't rent out to anyone unless you are paying 10x to 100x more per night. I was on hold on the phone for 2+ hours with the management (while my wife was patiently waiting eating her dinner in a fancy restaurant, which ruined the meal) while trying desperately to find any available room in town. Again, I had proof that I had booked online. This time the hotel had just switched processing companies that deal with online booking and double booked--once with each processing company. They finally relented and gave me a luxury 8-room cottage that wasn't booked that weekend (we had booked their cheapest room with shared bathroom).
(c) Taking the room that the person next to me is currently checking into. This time I had booked the day before and the hotel staff wasn't notified. As I pulled up to the hotel around midnight, another car pulled up at the same time. They entered first and asked for a room (they had no reservation). There was one left. Then the staff turned to me and said that this person was taking the last available room and that I'd need to drive 50+ miles to the next town. I said that I had a reservation, showed proof of payment, and the person who got there seconds before me was turned away.
(d) Bigger hotels have that one room that they won't rent out because it is terrible but they have in reserve for this purpose. Same story as case (c), although we were checking in around 8 PM. Some group arrived seconds before me and was being told about one last room that was available (they had no reservation). As they were discussing the room, I tried to check in and was told that the hotel screwed up since they had no normal rooms left. I believe that I was given the room that the group next to me was debating (it had one too few beds for their needs). It was a large hotel and it is the center basement room that was filled with bugs and didn't look like it had been cleaned in months. But, it was a busy holiday weekend and I took it.
I stopped using Expedia (cause or partial cause of problems a, b, and d). Their reservation system apparently books you without contacting the hotel directly to see if there is still a room available.
I've also been on the wrong side of the stick. I was turned away once for a double-booked hotel room but they had a sister hotel a few blocks away with a room.