Straight from the EUNI wiki class Overheating 101 :
Repairing heat damage
There are two ways to repair heat damage to modules.
The first is simply to dock up at a station with a Repair Shop, and use the station service to repair all your modules. [snip] Using a repair shop in this way is the only way to repair broken modules.
If your modules are merely damaged, and not broken, you can repair them in space using a substance called Nanite Repair Paste. To use this, you simply need some of it in your cargo hold, and when right-clicking on a damaged module you will see an option to 'Repair Module'. Note that you don't need any skills at all, not even Thermodynamics, to be able to repair heat damaged modules using this paste.
A module under repair cannot be used, and no other modules - on any rack, high mids or lows - can be overheated whilst one or more modules are being repaired. You can however repair and reload a turret at the same time. You can repair a bit at a time, by right-clicking on a repairing module and selecting Cancel Repair.
In a very similar fashion to station repair costs, repairing higher meta level items or large/medium items will consume more paste.
There are two skills that improve your repair efficiency:
Nanite Operation - which reduces the amount of Nanite Repair Paste required by 5% per level, thus causing you to use less paste
Nanite Interfacing - which increases the amount of damage repaired per second by 20% per level, thus making your repairs faster
Neither of these skills are required to use nanite repair paste, they only make it more efficient.