There are a few issues that could cause your iPhone to be silent when it should be ringing.
First, on the side of your iPhone there is a switch just above the volume buttons. If you can see an orange strip in this switch, toggle it upward (toward you when the display is facing you).
If this does not resolve your issue, go to the Settings app and tap on the Sounds section. Make sure the Ringer and Alerts volume slider is all the way to the right. Also, tap on Ringtone and then any of the Ringtones in the list. If you cannot hear the ringtone when it is tapped, it is most likely an issue with either the software or the speaker.
If you are able to hear other sounds from the speaker on your iPhone, but not the ringtone, it is either a software issue or the mute switch (the side switch from the earlier step) has stopped responding. Try hard restarting your iPhone by holding the power button on the top of it until you see the Apple logo. If the issue persists, back up your iPhone to iCloud or your computer and visit an Apple Store. They will most likely need to restore (erase, hence the need for a backup) your iPhone to factory settings. If that does not fix the issue, then it is a hardware problem. All software repairs at Apple Stores are free, but hardware repairs may cost money if your iPhone is out of warranty.
Instructions on how to backup and restore your iPhone, if necessary: http://support.apple.com/kb/HT1766?viewlocale=en_US&locale=en_US
I hope this helps. If you have any questions about the instructions above, let me know and I'll do my best to help.