What comes next
We can split the pattern into two:
The first part is the polygons which contain other shapes within them. The number of sides of these are increasing by 1 in each successive figure.
So the first polygon is a triangle with 3 sides, second is a square with 4 sides, next is a pentagon with five sides.
Hence the next polygon in the pattern should be a hexagon with 6 sides.
In the second part, we have the shapes inside the polygons. The number of sides of these shapes is also increasing by 1 each time.
The first has 4 sides (square), second has 5 sides (pentagon), third has 6 sides (hexagon). So the next one should have 7 sides( heptagon).
Combining the two parts, the fourth figure should be:
A larger hexagon (a polygon with 6 sides) with a smaller heptagon (a polygon with seven sides) inside it.
So the figure that will come next in the pattern will be: