If you can remember the model number of your phone, try searching on net for it's firmware. Download that on your PC. Install ODIN in your PC. Plug in your phone with the PC. Install the firmware using ODIN. That's it.
For detailed tutorial, try searching on youtube. There's a plenty of tutorial about it.