What causes goose bumps?
We get goose bumps because of the flight or fight response or because of cool temperature. The process is that whenever our body experiences such stimuli, the arrector muscles contract and thus the hair follicles straight out. As per the evolutionary point of view, mammals possessed this feature to portray the enemy our response ( in fight). Given photo will tell you the arrector muscle's position so that u can understand how the follicles straight up. 
And the thing about cool temperature, the goose bumps appear so that they can form an insulation sort of thing to prevent us from losing our body heat to the surroundings.