All bodies consist of atoms which contain equal amount of positive and negative charges in the form of protons and electrons respectively. The number of electrons being equal to the number of protons as an atom is neutral. If the electrons are removed from a body it gets positively charged.
Charging by friction
When two bodies are rubbed together, a transfer of electrons take place from one body to another. The body from which electrons have been transferred is left with an excess of positive charge so it gets positively charged and the body which receives the electrons becomes negatively charged. The positive and negative charges produced by rubbing are always equal in magnitude. When a glass rod is rubbed with silk, it loses its electrons and gets a positive charge. While the piece of silk acquires equal negative charge. An ebonite rod acquires a negative charge, if it is rubbed with wool. The piece of wool acquires an equal positive charge.
Charging by Induction
If a positively charged rod is brought near an insulated conductor, the negative charges in the conductor will be attracted towards the rod. As a result, there will be an excess of negative charge at the end of the conductor near the rod and the excessive positive charge at the far end. This is known as electrostatic induction. The charges thus induced are found to be equal and opposite to each other. When the positively charged rod is removed, the conductor will again become electrically neutral.
When a positive rod is brought near the conductor, negative charge is induced at the near end and equal positive charge is induced at the far end of the conductor. Now if we touch the far end with a conducting wire connected to the earth, the positive charge here will be cancelled by negative charge coming from the earth through the conducting wire. Now if we remove the wire first and then rod, the induced negative charge which was held at the outer end will spread over the entire conductor. It means that the conductor has been negatively charged by induction. In the same way one can induce a positive charge on a conductor by bringing a negative charged rod near it.
Charging by conduction
Take two conductors one charged and other uncharged. Bring the conductors in contact with each other. The charge whether negative or positive, under its own repulsion will spread over both the conductors. Thus the conductors will be charged with the same sign. This is called as charging by conduction (or contact).