In an atom there are mainly two types of forces acting,
2. Electro magnetic force
Pure matter comes wrapped in extremely tight space time curvature, almost an infinite gravity. Nucleus of an atom consists of protons and neutrons which may be considered as particles containing pure matter ( today it is believed that these composite particles further consist of Quarks etc). Within a nucleus, electro-magnetic force(similar charged particles) prevent these particles, protons and neutrons, from collapsing into one another. But still the nucleus has a very close knit of the space-time fabric. Now, the electrons come into picture.
Electrons are basically energy particles and have the Particle-Wave Duality. The electrons are using electro magnetic energy to stretch the tight space-time latex wrapped around the nucleus, which gives required dimensions and body to a nucleus.