The basic structure of an atom is the result of the electromagnetic attraction between the positive nucleus and the negative electrons.
An electromagnetic force is a fundamental force in nature that exists between charged particles. An electromagnetic force is a combination of electrical and magnetic forces. The electromagnetic force can be attractive (coming together) or repulsive (pushing apart).
The saying "opposites attract" refers to the fact that positively charged substances attract negatively charged substances. Electrons are negatively charged. The nucleus is made up of protons and neutrons. Protons are positively charged subatomic particles while neutrons are neutrally charged subatomic particles. Thus, the nucleus has an overall positive charge. The negative electrons are attracted to the positive nucleus. It is this electromagnetic attraction that keeps the electrons in orbit around the nucleus.