It is a device used to detect the presence of charge on a body.
When a charged body is brought near the electroscope the light weight pith ball is first attracted to the rod. Once it has touched the rod it gets repelled. When the pith ball comes in contact with the rod some of the charge from the rod gets transferred to the pith ball. As a result, it acquires similar charge. Because of the similar charge it then gets repelled. Attraction precedes repulsion.
The gold leaf electroscope is a more sensitive instrument. It consists of a draught proof metal case with glass sides housing the gold leaves. The gold leaves 'L' and 'M' are attached at one end of a vertical metal stem S. At the top the stem has a metal place 'C'. The stem is carefully insulated by plastic material from the surrounding metal case. The case is earthed to protect the leaves from electrical disturbances outside.