Lets take a element like carbon , carbon is neutral as it has 6 protons and 6 neutrons , both are negative charges and positive charges thus they are neutral but then if the electron number which is 6 changes to 5 then the carbon will have a net charge , it would have a net charge of +1 , this is called a ion.
What if we have something like 5 protons and 5 electrons , then what would it be ? We have to know that protons are the particles that define a element , now if we look which element has 5 protons we are looking are boron , imagine if boron lost an electron then it will be known as - charged boron thus its net charge would be negative
Example
Imagine if we have platinum with a mass number of 195 and there are around 74 electrons only , we have to find the net charge of the element and neutron number . For this we have to know the proton number of plutonium which is 78 , 78 - 74 which is 4 thus the net charge of the element would be +4 as it has 4 protons greater , to find the neutron we have to create a expression which would be 78 + N = 195 which is 117 neutrons