Like most operating systems, iOS and the apps that run on the iPhone and the iPad creates temporary files during normal operation. There is nothing wrong with this behavior as it helps the performance of the operating system and the apps. However, over time these files can add up taking up a significant portion of your storage. iOS does not have an effective mechanism to clean up these files which result is lost space. On mobile devise that typically have a limited amount of storage already, every MB of space is important.
I use a free Windows and Mac utility called PhoneClean that will work with any iDevice including the iPhone and the iPad to scan for these temporary files and allow you to delete them. Download and install a copy from iMobile at http://www.imobie.com/phoneclean/download.htm
Then just start it up, plug in your phone and click Start Scan. After the scan is completed you will see the results of the space that can be reclaimed.
You can click the down arrow to see the details and even preserve some files if you want. Click Clean and your device will be cleaned up.