Why don't my apps or keyboard play sound?

My iphone 5 can play sound when I test my ringer and alerts but none of my apps play sounds nor does my lock or keyboard. What is wrong with my phone?

Maybe the button on the left side of your phone is turned onto silent. If it is, the little slot is orange. Just move it to the other side to turn off silent mode