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.
Gaels would also offer food and drink, and light bonfires to ward off the evil spirits.
The carving of pumpkins originates from the Samhain festival, when Gaels would carve turnips to ward off spirits and stop fairies from settling in houses.