First, you should try clearing your data by going into settings. Then scroll down until you locate the safari option. When you click safari press the button that says clear cookie and data. If that doesn't work you can try closing the background apps by clicking the home button twice then holding down the apps and closing them. If they both don't work you can tell me or you can contact apple support.
Perhaps you could do a factory reset and see how it behaves. Take note that a factory reset wipes off all data from the phone, so you'll have to start from scratch. If that doesn't help, talk to a mobile repair technician or the manufacturer for professional assistance.