My arduino gets hot when us a 12 volt adapter

@jucasan

What do I have to do in order to connect the arduino to a battery?

Depends on the battery voltage.