How does particles gain electrical charges and repel each others? (electrostatic stabilization) When I study electrostatic stabilization, I understand that the particles have same charge and thus repel others, this is how colloid is stabilize. But how does particles gain electrical charges and repel each other in the first place? I think that there are weak electrostatic force on the particle and when electrolytes were added, it gain more charges. Thank you. 
 A: John Rennie will probably have more details on the matter, but in general colloids (such as oil dispersed into soap water) are not so much stabilized by a net total charge of the mixture, but rather are stabilized by repulsions from separated charges. For example:

This is a cartoon representation of what an oil droplet in soap water looks like; note that the surface of the oil droplet is net negatively charged due to the carboxylate (or sulfonate) heads at the oil surface. 
In essence, you have negatively charged oil droplets floating around in a positively-charged fluid. The net charge, however, is zero.
If two of these oil droplets attempt to collide, the negatively-charged heads on the surface will repel each other, preventing aggregation. This is what stabilizes the colloid.
You'd have to provide more details on what kind of colloid you're examining in order to tell if this is actually the mechanism stabilizing the colloid you're looking at.
A: There are two mechanisms. Which one is more important depends on the colloid.
A large number of colloidal particles have ionisable groups on their surfaces. These are usually salts of carboxylic acids. The vast majority of organic colloids (e.g. milk) are in this class, as are colloids prepared from acidic monomers like the acrylates. In water the surface groups dissociate in exactly the same way that sodium acetate dissociates in water. The cations form hydrated ions in the water and the surface is left covered in negatively charged carboxylate ions.
The second class is where the colloidal particles have no surface groups that can dissociate, but they can adsorb ions from solution. The obvious example is if there is an anionic (or less commonly cationic) surfactant in the solution, but the particles may adsorb much smaller ions like sulphates. Colloids made from polyvinyl acetate/alcohol are probably the most common examples of solid/liquid colloids in this class, and emulsions are the most obvious liquid/liquid colloids.
