You accidentally went into 'Free Look' mode. The default key to toggle “Free Look” (mouse) is "U"