Constellations and asterisms are both patterns of stars, but the terms refer to different groupings.
One confusion between the two comes from the various ways in which we understand the word constellation. Let's start by considering the difference between traditional constellations and modern astronomical ones.
Commonly, people think of constellations as traditional patterns of stars that are often shown as “stick figures” and may represent classical myths. There's nothing wrong with this idea, and the traditional constellations are the basis for the astronomical ones.
We have to realize that all star patterns are human inventions based on what we see from Earth. The stars in a constellation are rarely near each other in actuality. For example, of the five brightest stars in Cygnus (the swan), the nearest one to us, Epsilon Cygni, is 72 light years away. The most distant one is over twenty times farther away than that. (A light year is around ten trillion kilometers or six trillion miles.) If we were in another part of the Galaxy, the stars of Cygnus wouldn't form the pattern we're used to seeing.
There is also a cultural basis for constellations because although astronomers use mainly the Greek and Roman constellations, other cultures have their own.
The astronomical definition of a constellation is both broader and yet more precise than the popular one. The International Astronomical Union (IAU) agreed on a list of 88 constellations, and in 1928 also agreed on their boundaries. They cover the entire sky with no overlap.
The traditional constellations are only defined by their stars. However IAU constellations include the stars and a defined area of sky. In this sense you might think of a constellation as analogous to a country on the Earth’s surface. If we say that a comet is appearing in Leo or that Saturn is in Virgo, this means that people can see these objects within the boundaries of those constellations.
Asterism is an unfamiliar word to most people, though you’ll probably recognise the aster- part of it, which comes from the Greek for “star”. The best-known asterism is the Big Dipper (the Plough, in Britain), which is part of the constellation Ursa Major. Despite its name, the Summer Triangle can be seen for much of the year. It consists of the brightest stars of the constellations Cygnus, Lyra, and Aquila. The Great Square of Pegasus is another well known asterism.
Very simply, an asterism is a recognizable pattern of stars that isn’t a constellation, but contains a part of one or more constellations.