My arduino gets heated as I plugin it to my computer

I wrote a code and when I plug my arduino UNO to the computer it heats. (Doesn't even take 5 seconds). Can someone tell why it happens and how to stop it ?

You made a mistake :wink:

Seriously though, your post is lacking every possible detail that is needed.

  1. What is heating up?
  2. What is all connected to the Arduino? If anything, provide a complete wiring diagram that includes all power connections; a reasonably sized (300 kB or so) photo of a handdrawn diagram / schematic is OK.
  3. How is it powered?
  4. Your code, properly formatted using <ctrl>T in the IDE and posted using code tags in the reply box.