To put it in its simpliest form: Attraction to the (positvely charged) nucleus, repulsion by other negative electrons and (kind of) centripetal force. The real story is far to complicated to put it...
The positive protons in the nucleus keeps the electrons in orbit because the opposite charges rebel each other.
Strong nuclear force.
It is called the electromagnetic force. It is described mathematically by Coulomb's Law.