With folding barriers like the one below, how does the orange bar get turned by the green mechanism? What's inside the yellow triangular part?
What you see here is two sets of four-bar linkages connected to each other to form a six-bar linkage. To be more precise this is a Watt type 1 six-bar linkage. This particular configuration is known for its ability to fold together by rotating only one member.
Image 1: The classification of some planar 6 bar linkages
There is nothing inside the yellow part although in parallel to that there is a straight linkage bar. The way you analyze these is just draw a simplified image contain just joints and apparent connections.
Since the pink linkage sits above the blue arm in the post, it has no problem reaching up to the trangular part when blue arm is raised. When blue arm is lowered, the pink linkage doesn't reach as far up the blue arm and starts to pull back on the triangular part, erecting the orange arm