OP said: "I recently began tinkering with a small project, and I’ve noticed that my linear regulator heats up even when it’s not driving much current."
This is a great question and I am glad you posted it. I hope you don't feel picked on, but you gave me an opening to share something I learned the hard way.
The watts are what matter here, not just voltage or current. You didn't give us any idea what voltage you are starting at or how much current you need, so let me just illustrate whet can happen if the input voltage is too high to begin with. I'll just make some wild assumptions and you can tweak the numbers to match your application:
Input voltage = 30V
Desired ouput voltage = 5V
Current through the load, average = 20mA
Regulator: 78L05
Okay, 78L05 is a good choice, it can handle 100mA, 20mA should be no problem. Power dissipation is ... hmm, the datasheet says "Internally limited". That's not very helpful.
Thermal resistance is 230 degrees C per watt. What the heck does that mean??
So, you have some concerns but you build it anyway. See what works, what doesn't.
You build it, and yep, the case gets hot, but the "internal Limiter" does its job and shuts off the regulator. Now what?
Let's go back to the beginning. The regulator puts out 5V. 30V goes into the regulator. What happens to the other 25V? It gets turned into heat by the internal pass transistor of the 78L05.
Dig out your sliderule now and figure out what 20mA times 25V is. I get 0.5W. Half a watt in a little TO-92 package. That's a lot of power for a little humk of plastic to dissipate.
Remember that thermal resistance number, 230 degrees C per watt? Here's what it means. If your 78L05 is dissipating a half a watt on average, the temperature of the die inside the plastic blob is 0.5W * 230 degrees C per watt or 115 degrees C PLUS the ambient temperature of 25 degrees C. That's 140 degrees C, well above the maximum operating temperature of the 78L05.
It's always a good idea to be sure we read and understand the datasheet before we jump in and assume we have the right part and it's going to work. I've done it too many times myself--I find a part after a long search, breadboard it up, and it sort-of works, sort-of doesn't. I go back to the datasheeta andd there it is, plain as day--the hidden gotcha.
With linear electronics, any power that goes into a device, either goes out of it as work, or is turned into heat by the device. It's liike Newton's Law: Energy in == Energy out == Work done + heat. Always. If it doesn't come out of the device as a signal or some other form of work, it is turned into heat. When you get into digital, things get really weird, but my time is up