An atom consist of electron, protons and neutrons. Protons and neutrons are present with in nucleus while the electrons are present out side the nucleus.
All these three subatomic particles construct an atom. A neutral atom have equal number of proton and electron. In other words we can say that negative and positive charges are equal in magnitude and cancel the each other. For example if neutral atom has 6 protons than it must have 6 electrons. The sum of neutrons and protons is the mass number of an atom while the number of protons are number of electrons is the atomic number of an atom.
when a neutral atom loses a electron positive charge is created because number of protons are positive charge becomes greater than negative charge.
X → X⁺ + e⁻
When a neutral atom accept the electron negative charge is created because negative charge is become greater than positive charge.