Chebyshev Link Motion. (cognate form known as the Lambda Motion)
It's a classic, also sometimes seen in its original form using circular motion to provide a 6th order approximation to a straight line.
The crucial dimensions are in a 2:4:5 ratio (or 1:2:2.5 in the animation linked above)
This is an improvement on the earlier (by about a century!) James Watt Parallel Link motion, which provides a fifth order approximation - and was the invention he was most proud of - as well as sparking the whole field of four-bar linkages as field of systematic study.
Some time ago I simulated these linkages ( in a spreadsheet) and plotted the errors - the Chebyshev, designed for 1 metre of linear travel, gives an equi-ripple error reaching 0.6mm off the straight line. (For other travels, the error scales accordingly).
You can actually tune the Watt linkage's error to be even lower than this, despite it being only 5th order - if you have space for slightly longer links.
Analysis with a spreadsheet isn't particularly difficult.
Start with a fixed point at some coordinate, X1 = (0,0) and a length, say, R=5 and use the equation of rotary motion (X^2 + Y^2 = R^2) to plot multiple values of Y1 at different angles of rotation. From a second fixed point, say, X2 = (4,0) and R2 = 5, find values of Y2 such that Y2 is also a fixed distance (R3 = 2) away from each Y position. This turns out to be solving quadratics, and not all angles have valid roots. Finally plot the midpoint of the Y-Y2 bar and if you've chosen the dimensions above you have the regular Chebyshev link motion.
You'll see that cancellation of two rotary motions is at the heart of it, but the rotation of the third link introduces complications and the devil is in the details.
As the other answer says, synthesis is more "involved" - to the extent that some of the world's top mathematicians devoted decades of their lives to it, and as far as I know, synthesising any motion you might want is not yet a solved problem.
I believe this is related to the use of Chebyshev's polynomials in electronic filter design, where equi-ripple errors on a straight line passband (or stopband) are also important.
Finally note that the straight line portion is also practically linear in distance per degree rotation (with a relatively fast transit through the curved part of the path).
This leads to "Tchebyshevs plantigrade machine" which maintains a practically constant speed of perfectly linear motion. I am glad to see that animation - I "invented" it independently after seeing the above motions, and actually built a slightly simpler form in Meccano years ago, though I'm not surprised it already existed and had a name.

If ever there was a steampunk walking robot, to an authentic 19th century design, this is it.