A pentagon has five sides. If you look at the word itself, the root is "penta", which translates roughly to mean five. It is from the greek word "pente," which means five. If you look at all the of the shapes in geometry, the words that describe them often have clues to how many sides that they have. For example, a triangle has the root of "tri," which means three. A hexagon has the root of "hexa," which means six. An octagon has eight sides, related to "octo," which means eight.
I remember the differences between them all through connections. Octopuses have 8 arms, right? So, an octagon has 8 sides. And, for a pentagon, I think of a fist, pent up in rage (silly, I know, but this is how I remember things), and fists have five fingers, right? Hexagons are easier to remember because Hex has an "x" in it, just like a six does.