Internal resistance is just a concept for approximating the non ideal behaviour of a battery. This latter is ideally defined as a device that is capable of provinding a constant voltage regardless of the current the circuit being fed is draining. If you were to plot such a device in a
V(I) graph, it would be a horizontal line.
However, such a device does not exist in reality, meaning that the voltage provided will be constant only for a certain range of drained current (and many times not even for that): as a first approximation one could model this non-ideality as a line with negative slope in the
V(I) graph: the more the current required, the less the actual voltage supplied. But such a line describes a negative resistor from the perspective of the generator, or a positive resistor from the fed circuit perspective: this artificial resistor is called internal resistor.
It describes very well a series of actual phenomenon of a battery, such as joule heating, for a certain operative range (
I), but there is no resistor component as such inside the battery.