Probably you installed ultrasn0w on an incompatible baseband. Open Settings, click on General, then on About and scroll down to Modem Firmware to check the version. Ultrasn0w is compatible with these versions, depending on your device:
- for iPhone 3G/3GS: baseband 5.13.04 or lower (or the iPad baseband 6.15.00)
- for iPhone 4: baseband 1.59.00
- for iPad: baseband 6.15.00
If you have any other baseband version, go to Cydia and uninstall ultrasn0w. If it still doesn't work, then you need to restore your device. Afterwards read about how you can unlock (if at all).
Another reason for this could be that your SIM is broken or has expired. Usually prepaid SIM cards expire after a few months when not in use. Test the SIM in another phone first.
A third reason could be a hardware fault. This is not covered by this site.