Origin of atoms -
They were formed right after the "Big Bang" when our universe originated from pure energy some billions of years ago. The energy was converted to the elementary particles (quarks, gluons, leptons etc.) from which protons and neutrons were formed. From these, atoms of different elements were produced.
Atoms consist of electrons revolving around the nucleus. The nucleus has protons and neutrons. All these subatomic particles are made of quarks, gluons etc. which were generated after the Big Bang.
Atomic structure-
The models for atomic structure consider few assumptions. Firstly, 99% mass of an atom is concentrated in the centre in the form of nucleus. The nucleus contains protons and neutrons.
Secondly, electrons revolve round the nucleus in fixed orbits. Every orbit has its own capacity to accomodate electrons.
Figure shown below illustrates the distribution of electrons around the nucleus in an atom.
Here you will find that M and N shells can accomodate maximum 18 and 32 electrons respectively but actually they reach stable state with 8 electrons each. In fact, except the first orbit (K) all other orbits take up 8 electrons. The trend is same for all elements. The atomic structure for some of the elements is given below.