How do flap track guides work?
There are different ways of moving flaps. The trivial case where they rotate around a hinge point which lies within the airfoil contour does not increase wing area. Fowler-type, backward-moving flaps are possible in three general ways: 


Douglas flap: Here the flap rotates around a single hinge line which lies substantially below the airfoil contour. As the name suggests, this is used on many Douglas Commercial aircraft.




Douglas flap, left: retracted (source); right: extended (source). Their long and narrow supports make them easy to recognize.


Four- or five-bar linkages: These are mechanically more complex, but enable a more compact mechanism. As their name suggests, four or five linkages are connected with bearings and enable a more complex movement. The drawing and the animated GIF below are taken from Wikipedia and show the mobility m which increases with the number of joints. This would be my recommendation for a Lego model; just make sure that the forward bar is longer than the rear bar - this will give you a realistic movement of the flap.




Above: Linkage mobility (picture source). Below: Four bar linkage (picture source)




Sliding block guide: Here you find real rails and rollers which move along them to enable the most complex and precise movement, even for multi-element flaps. While a four-bar linkage will have a continuously increasing ratio of deflection angle to backward shift, a sliding block guide makes it possible to set the deflection angle independent of the backward shift, and allows the biggest backward shift for a given size of the mechanism. See the Boeing 747 flap tracks below for an example.




Boeing 747 flap tracks (picture source). Note that the upper block is supporting the first flap segment and the lower block the second. Actuation is via a spindle; the linkage in the lower left corner is actually the mechanism for moving the flap fairing.