Apple released iOS 5.1 along with New iPad on March 7th and in case you have upgraded to iOS 5.1 and want to downgrade to to iOS 5.0.1 or 5.0 then you need to follow the following steps.
You need saved SHSH Blobs of the iOS firmware version to which you want to downgrade from iOS 5.1.
How to downgrade iOS 5.1 to iOS 5.0.1, 5.0
You will require -
Download latest version of iFaith
Download iTunes 10.6
1.Run iFaith and choose the “Build *signed* IPSW w/Blobs” > “Build IPSW”.
2. Now browse for the saved SHSH blobs file for iOS 5.0.1 or iOS 5.0 firmware.
3. After you select the firmware to which you want to downgrade iFaith will create your custom firmware file.
Also See: Save SHSH Blobs With iFaith (How To)
4. You will now have to follow the instructions to put your idevice into pwned DFU mode.
5. Launch iTunes and restore idevice to the custom firmware file you created.For Windows users by clicking on “Shift” and “Restore button” whereas for Mac OS X users can be done by clicking on “Alt Option” and clicking on “Restore button”.
Your idevice is now downgraded to iOS 5.0.1 or iOS 5.0.