Each problem figure has an outer frame (a square with one side missing) and an inner square with one diagonal.
Outer frame: in figure 1 the missing side is the bottom side, in figure 2 it is the top-left side (the frame is tilted by 45 degrees) and in figure 3 it is the right side. So the gap moves 135 degrees clockwise in every step.
The next figure therefore has the gap at the bottom-left side, with the frame tilted by 45 degrees.
Inner square: it alternates between upright and tilted (a diamond), so the next one is a tilted diamond. Its diagonal turns by 45 degrees each step (slanting up, vertical, slanting down, then horizontal), so the next diagonal is horizontal.
Option (4) shows a diamond with a horizontal diagonal and an outer frame missing its bottom-left side. Options (1) and (3) have the gap at the top-left and option (2) has a different inner figure.
Answer: (4)