A class of 25 records how many minutes each student takes to get to school. Make bins 10 minutes wide: 0 to under 10, 10 to under 20, and so on up to 50. Drop each time into its bin, like sorting coins into slots, and draw a bar as tall as each bin's count. If the counts are 3, 9, 7, 4 and 2, the tallest bar is the 10-20 minute bin and the bars shrink to the right: most students live close, a few live far.
The bars touch because the bins are consecutive pieces of one number line; every possible time falls in exactly one bin. Bin width changes the picture. With 2-minute bins, 25 values would be spread thin and spiky; with a single 50-minute bin, everything becomes one block. Choose a width that shows the shape, and keep every bin the same width so the heights can be compared fairly.
A bar graph also uses bars, but for categories such as favorite sport. Its bars stand apart, and you could reorder them, soccer before or after tennis, without changing the meaning. Histogram bars cannot be shuffled, because each one stands for a range of numbers in order. And the tallest bar shows the most common range, not the mean: using each bin's middle value, the commute data's mean is about 25555=22.2 minutes, outside the tallest bin, because the long trips pull it up.
Think of it like this. A histogram is a row of sorting bins under a chute: pour in the data and each value drops into the slot for its range, so the heights of the piles show the data's shape. Change the slot width and the piles change shape, even though the data itself has not changed.
Core idea. A histogram groups numeric data into equal-width bins and draws a bar for how many values fall in each.