It happens, don't worry about it. Even someone like myself, who has been using Apple's touchscreen devices since iOS was actually called iPhone OS, makes mistakes. My iPhone was doing the same thing last week and I couldn't figure it out until I remembered, after about half an hour, that I had enabled the rotation lock.