These are also known as "hair muscles". These are tiny muslces that are attached to the hair shaft. These muscles cause the hair to stand up or be erect. When the Arrector Pili muscles contract due to stress, fear or other nervous conditions, the hair becomes stiff and will actually "stand on end".
Daily Hair Tip
If your hair is prone to static electricity, use a moisturizing or conditioning shampoo and use a cream rinse or light conditioner to keep hair from getting too dry.