Different ions with different charges. Sodium (Na^+) as you can see has one positive charge per ion, as does potassium (K^+), calcium has two (Ca^2+), and hydrogen has one (H^+). This charge is balanced with negative charges, a minority from chloride (Cl^-) and the majority from proteins. When it comes to proteins, they are comprised of amino acids which have varying charges and proteins generally end up with a negative charge from all of the sites where they can be protonated. Just for clarification, protonation is where a H+ (a proton) can ironically bind to a molecule with a negative charge, this is how most acids work (that's a generalization don't @ me, chemists)
So we have a shitload of proteins inside the cell with a shitload of negative charges, we have a variety of ions with positive charges, and we have ion channels which are transmembrane proteins that have a specific structure to allow certain ions of one charge or size or just all ions in general to pass through their pore. Some are leak channels which are almost always open, some open when a ligand (other molecule) binds, some open when they sense a certain voltage.
That takes us to difference in charge. The cell membrane acts as a capacitor, separating charge. There are many pumps that pump out positive ions to maintain this separation and different cells can sit at different voltages where the voltage is simply the difference in charge between the intracellular and extracellular space, this can be measured in whole cell configuration patch clamp experiments where we attach a pipette with a tip smaller than a cell to the membrane and apply suction to break into the cell so we can get a reading but that's a whole topic on its own
When it comes to excitation vs inhibitions, it really is about positive vs negative charges. Excitatory ion channels such as kainate AMPA and NMDA receptors pass cations, the positive ions, while GABAa and glycine receptors are ion channels that selectively allow Cl^- into the cell in adults.
The developing brain is weird and backward when it comes to Cl^- so again, another topic