Celts dressed up in white with blackened faces during the festival of Samhain to trick the evil spirits that they believed would be roaming the earth before All Saints Day on November 1st.
The influx of Irish immigrants in the 1840s to North America could not find any turnips to carve, as was tradition, so they used the more readily available pumpkin into which they carved scary faces.
The tradition of Halloween was carried to America by the immigrating Europeans. Some of the traditions changed a little, though. For example, on Halloween in Europe some people would carry lanterns made from turnips. In America, pumpkins were more common. So people began putting candles inside them and using them as lanterns. That is why you see Jack o lanterns today.