What files does Craft store in "craft/storage/runtime/temp" What files does Craft store in craft/storage/runtime/temp folder.
And what is the purpose of it.
And how to stop it form getting huge.
The easiest thing is to look it up. Craft CMS is usually really self-explaining So when you take a look at your folders in craft/storage/runtime/temp you'll see the following

/assets &lt;- for example cached thumbnails/preview icons and all those things
/cache
/compiled_templates &lt;- templates that have cache tags, that should only compiled once... for example static pages that does not change that much
/HTML &lt;-- mostly some json objects
/logs &lt;-- well seems obvious
/state &lt;-- Yii.CSecurityManager.validationkey a json object


The compiled_templates folder could become huge when you messed around with cache tags too much or if you have a really large site.
assets will grow when you insert many assets.

The purpose of this folder is to make Craft CMS faster because it does not have to generate HTML, thumbnails and so on with every page refresh, instead it uses already generated files. 

How big is this folder for you? Does it require too much space?