If you try and tessellate a square or a regular hexagon, you will succeed. But try as you may, you will never tessellate a regular pentagon, nor will you be able to tessellate a regular octogon. Why do some basic shapes tessellate while others do not? The answer lies in the angles.
If a basic shape tessellates, then its corners (or vertices) should all be able to meet at one single point. For example, in the image with the tessellating hexagons, there are certain points at which multiple vertices intersect. Anybody with a basic understanding of geometry knows that the total number of angle degrees surrounding a point totals 360, right? And a single vertex of a hexagon has 120 degrees, right?** So three hexagons' vertices can fit around one point (360 / 120 = 3). Look at the image again; this does hold true!
So why doesn't a regular pentagon tessellate? Let's try it. Using our formula, we know that a regular pentagon has vertices measuring at 108 degrees. Therefore exactly three and one-third pentagon vertices can fit around that intersection point, as 360 / 108 = 3 1/3. Wait. That doesn't make sense. You can't just have 1/3 of a pentagon's vertex trying to squeeze its way into the tessellation. Nor can you just ignore it - remember, a tessellation can't have any gaps in addition to overlaps. So regular pentagons just won't tessellate.
How about squares? We already know they tessellate - come on, just envision a chessboard - but can we prove it? Simple! A square's vertex has 90 degrees, and 360 / 90 = 4, which means that an even four squares can fit around that intersection point. Decagons (10 sides)? A decagon's vertex has 144 degrees, and 360 / 144 = 2.5. No, a decagon will therefore not tessellate as we just can't accomodate that 0.5 of a decagon trying to fit in.
It turns out that we can develop a simple formula for deciding if a regular shape tessellates, based on the pattern you've probably noticed by now. Consider a to be the number of degrees in a vertex of the regular polygon in question. If 360 / a equals a whole number, then the shape tessellates. Otherwise, it will not tessellate. It's that simple.
**The formula for the number of degrees in a vertex of a regular polygon, for those that do not remember it, is [(n - 2) * 180] / n , where n is equal to the number of sides on the polygon. For a hexagon, this means [(6 - 2) * 180] / 6 = [4 * 180] / 6 = 720 / 6 = 120 degrees.