If an object gains an electron it will become negatively charged and object which looses an electron, it will become positively charged. When they do not come in contact, charge will remain them as it is but they can take or loose charges from the objects.
But when we rub comb from our hair, it attracts bits of paper. After some time the charge is gone . How?