This is not applicable for Samsung Galaxy Nexus & Nexus S phones.
Video URL: http://youtu.be/dtU1HFroTr0
1. Open your browser and go here.
2. On the right side in "Show All Devices" select your device model (make sure model number is correct).
3. After selecting your device model, download the applicable ROM for your region.
4. Click on "Stock Firmware (TeraFile mirror)". Now click "Regular". (Ads & windows may open after you click "Regular" so just click "OK" and close them.
5. Now, type the verification code & the download will start.
To install the ROM, follow this video:
Make sure the Stock ROM file is for your device model. Don't download the Stock ROM from the video but download the other files and follow the process.
DON'T FORGET TO USE YOUR PHONE'S STOCK ROM
Video URL: http://youtu.be/wcIQEilapEk