Static electricity is the build-up of electric charge on an object, usually caused when it gains or loses electrons and develops an imbalance between positive and negative charges.
Static charges can build up when two electrical insulators are rubbed together.
As long as no charges have escaped anywhere, the size of the two charges will be the same.
This process is known as the 'triboelectric effect'.
Which object gains electrons and which object loses electrons is decided by the materials the objects are made of. Generally speaking a balloon (made of rubber) will gain electrons.
If two objects have the same electrical charge they will repel, if they have the opposite electrical charge they will attract.
Rubbing two insulators together to make static electricity will produce two objects with opposite charges. Press