The only thing that comes to my mind (and this probably isn't it or you would have noticed) is that the wheel slipped in the dropouts and jammed against the frame. But that could only happen if you have horizontal dropouts. Otherwise I can't imagine what would make a rear wheel lock - I assume the wheel wouldn't turn in either direction, but the cassette was still free to go in reverse. I'd pull the rear wheel off the bike and see if anything seems amiss, eg. broken axle, disintegrated bearings, stick jammed in the hub. What kind of hub and how old is it?