Pudding has both a broad meaning and a very specific mention, depending on which side of the Atlantic you’re on.
In the UK, pudding has a very broad meaning and just means “dessert.” This broad usage appears to have started in the 20th century. If someone in the UK says they are going to serve pudding, you could have a fruit salad placed in front of you. If pressed to think of a more specific meaning, a Brit’s mind would probably then go to a “steamed pudding”, something boiled or simmered either in a mould or in a cloth. Many don’t like saying “dessert”, though, because it seems a bit lower-class to them. 
In North America, pudding has a very specific meaning. It’s a specific sweet, flavoured dessert, served after a meal in bowls and eaten with a spoon, that is based on milk thickened with a starch until it has a soft custard-like texture. It’s usually cooked on top of the stove, though microwave and indeed no cook versions are now available in packets, as well as ready-made versions in tins. Common flavours are butterscotch, caramel, coconut, chocolate, lemon and vanilla.
Pudding in the North American sense must be brought to a boil to cause the starch to gelatinize except for instant mixes in which the starch is a “modified starch”, that can gelatinize without heat. As the starch granules heat they swell, and some of their molecules go out into the liquid, making the liquid thick. When the mixture cools, the net of starch molecules traps the liquid inside it.
Pudding in the North American sense is sometimes compared to a custard, but technically a custard is a protein-gel, while a North American pudding is a starch-gel. That being said, though good custards are just egg, milk and sugar, cheating by adding a bit of starch isn’t unknown, though it may be unconfessed Adding a bit of starch helps to stabilize the custard, and make it a bit less likely to curdle. So, you could think of a North American pudding (most homemade recipes for which involve egg, milk and sugar) as being a custard with starch, with the starch (often cornstarch) playing an even greater role as a thickener and stabilizer. Starch has the added benefit of reducing the number of eggs in a recipe, which would have been a consideration at one time. And perhaps comparing it to a custard is not too far off: the Portuguese term for custard is “pudim de ovos”; “egg pudding.”
The closest sweet food in terms of thickness in the UK might be a Blancmange, but with a custardy texture, or Angel Delight, with a bit less air in it. Historically, the ancestor of the North American version of pudding would likely be “frumenty”, a milk pudding served along with meat and fish dishes at banquets in the Middle Ages.
Beyond the UK meaning of dessert, or the North American meaning of a custard-like dessert, the meaning of pudding gets even more complicated. Blood sausage is referred to as blood pudding. There’s pease pudding, which is a thick mash of cooked dried peas, and there’s Yorkshire pudding, which is more like a bread. And in America, there was hasty pudding, boiled cornmeal, which could be served as a savoury side dish or a dessert.
 For anyone reading this who just had a panic attack because s/he says “dessert”, remember that the word appears to be good enough for French chefs, who are still considered to know a thing or two about food.
The Jell-O Company introduced the first pudding mix in 1929 for institutional customers. Home versions appeared in 1934, but those versions still required cooking and cooling before they could be eaten. In 1953, they introduced instant mixes. The instant mixes required only cold milk and electric mixers, and could be made in 5 minutes, and then eaten right away. By that point, the Jell-O brand had basically defined the word “pudding” in North America.
Literature & Lore
“Blessed be he that inventeth pudding, for it is a Manna that hits the Palates of all Sorts of People; a Manna, better than that of the Wilderness, because the People are never weary of it. Ah, what an excellent Thing is an English Pudding! To come in Pudding-time, is as much as to say, to come in the most lucky Moment in the World.” — Henri Misson de Valbourg. M. Misson’s Memoirs and observations in his travels over England. London: D. Browne. 1719. Page 315.
“Rules to be observed in making Puddings, &c.: In boiled puddings, take great care the bag or cloth be very clean, not soapy, but dipped in hot water, and well floured. If a bread pudding, tie it loose ; if a batter pudding, tie it close, and be sure the water boils when you put the pudding in, and you should move the puddings in the pot now and then, for fear they stick. When you make a batter pudding, first mix the flour well with a little milk, then put in the ingredients by degrees, and it will be smooth and not have lumps ; but for a plain batter pudding, the best way is to strain it through a coarse hair-sieve, that it may neither have lumps, nor the treadles of the eggs : and all other puddings, strain the eggs when they are beat. If you boil them in wooden bowls, or china dishes, butter the inside before you put in your batter; and for all baked puddings, butter the pan or dish before the pudding is put in.” — Smith, Eliza. The Compleat Housewife. London, England: J. Buckland, J. and F. Rivington, J. Hinton, Hawes, Clarke and Collins, W. Johnston, C. Crowder, T. Longman, B. Law, T. Lowndes, S. Bladon, W. Nicoll, and C. and R. Ward. Chapter XV. Page 112.
The word “pudding” started life as the Old French word “boudin”, which we borrowed into English and transformed into “pudding”. Meanwhile, with centuries fast-forwarding on, the French found that the word “boudin” had in usage come to be restricted to sausages, so they had borrow the word “pudding” back from us to mean a steamed or custardy dessert. And thus, “le pudding” become a legitimate French word.
The Oxford English Dictionary says the word boudin / pudding started off meaning the offal of an animal, boiled in a bag or cloth. The ingredients would be bound together by blood or a starch. Then, the word came to mean any preparation, sweet or savoury (remember, in the Middle Ages people didn’t draw a black and white line between the two as we do now), boiled in a bag or cloth, as well as animal products cooked or chopped into a moosh and then stuffed into a casing like a sausage.
Now, the Oxford English Dictionary basically says, the Americans are more correct on this than the Brits, that pudding is a starchy food, boiled or steamed, often with butter, eggs and milk in it.