Every atom has a tiny nucleus at its centre. The nucleus is made of two kinds of particle, protons and neutrons. A proton has a positive charge of +1. A neutron has no charge, so neutrons are neutral. The nucleus therefore has an overall positive charge, which is equal to the number of protons it contains.
The number of protons is called the atomic number, and it is what makes an element the element it is. Every carbon nucleus has 6 protons and a charge of +6. Every oxygen nucleus has 8 protons and a charge of +8. If the number of protons changes, the atom becomes a different element, so the charge on the nucleus is characteristic of the element.
Electrons move around the outside of the nucleus and each has a negative charge. A neutral atom has the same number of protons as electrons, so the charges cancel. Protons and neutrons each have a relative mass of 1 while an electron has almost no mass, so nearly all of the mass of an atom is in its nucleus.