You are talking about the concept of static electricity. When you rub a balloon on your hair or clothing, it picks up extra electrons and becomes negatively charged. The rubber of the balloon is a poor electrical conductor so the negative charge stays on the surface of the balloon. When you place the balloon against a wall, electrons are repelled by the negatively charged balloon, thus leaving positively charged protons on the surface of the wall. The opposite charges are attracted so the balloon sticks to the wall. Eventually, the excess protons are transferred to the wall, thus neutralizing the net charge and the balloon no longer sticks to the wall.