Can someone explain the stars?

It's rather simple, it's called nuclear fusion.