Today is Halloween, or Hallowe'en, where the apostrophe stands for the missing 'v' from 'even' meaning 'eve'. The modern name is a shortened form of All-Hallow-Even, and can also be called the Eve of All Hallows. Hallow means a holy person or saint.
31 October was an important date in pre-Christian Celtic culture as it was the end of the harvest and the end of the year. The festival celebrated on the date marked the beginning of winter and was known as Samhain (where 'mh' is pronounced 'w'). Samhain began at sunset on 31 October and the Celts believed that the souls of the dead came back to visit their old homes and families on that night.
In the 9th century the Christian Church transformed the old pagan festival, which honoured all dead, to a festival honouring only the blessed or hallowed dead. 1 November, the start of the new year, was known as All Hallows' Day, Hallowday or All-hallomas. The last of these words, All-hallomas, appears in Shakespeare. The Church introduced the alternative name All Saints' Day to cement the Christian connection.
Today's Halloween traditions owe more to Hollywood and the marketing industry than to Celtic culture, although it was Irish immigrants who took the festival of Halloween to the United States in the first place. In Ireland people used to carve out turnips and put a candle inside in memory of 'Stingy Jack' a drunken old farmer who tricked the devil and was then condemned to wander the earth for the rest of his days accompanied by a single candle. Pumpkins were more readily available in North America so Jack-o'-lanterns are these days more likely to be carved out of pumpkins.
The expression 'trick or treating' goes back only to the 1930s (in the US, that is - it's more recent in the UK). The activity itself goes back much further -- to the old practice of 'souling' where people would go from door to door to solicit specially baked 'soul-cakes'. This activity continued into the early 20th century in parts of northern England and in Scotland, where it is known as guising.