Although pioneered by one or perhaps two naval aircraft (most notably the RN's Short Folder seaplane, whose very name derived from it) during WWI, wing-folding, like most other carrier-related developments, didn't really come into its own until just before- and during WWII, whence it has remained in use, essentially unchanged, ever since:
Ultimately, three main approaches to wing-folding were adopted, as could be termed "overhead", "swept-back" and "tucked-back" schemes.
OVERHEAD FOLDING

Click on Image to Enlarge Examples of overhead folding include the AD SkyRaider (left) and F7F TigerCat (right), whose wings of course fold straightforwardly upward/inward - regardless whether the tips actually fold clear over the fuselage, as in the former, or don't, as in the latter - or may not even fold past the vertical, as in, for example, the F2H Banshee (not shown). The hinges are aligned with the fore-and-aft (longitudinal) axis of the aircraft - with the S2F Trackers, at top, representing a minor variation, in which the hinges are skewed very slightly off-axis, to allow the wingtips to fold past each other, reducing overall height. Other variations have ranged from, on the one hand, restricting folding to only the wingtips - such as on the A6M Zero, or F-4 Phantom, etc. - to, at the other extreme, folding not just the entire wing but additionally folding the wingtip downward/outward, in an accordian-like double fold, as on the Fairey Gannet.
SWEPT-BACK FOLDING
This approach, such as implemented on the Fairey Swordfish (top) or F-14 Tomcat (bottom) is a again a straightforward rotation, except now around the vertical axis, leaving the wings more or less parallel with the fuselage. The hinge axes are vertical (or nearly so) - on the Swordfish, for example, running along the inboard aft wing struts. Additional variations, such as that seen on the Fairey Barracuda, have included lifting and/or dropping inboard sections of the wing- and/or flaps above or below the wing plane, to allow the wing to scissors past them, during folding.
TUCKED-BACK FOLDING

Click on Image to Enlarge The third, last-invented and by far the most elegant and ingenious approach (IMHO) - as attested by its immediate and longstanding success, being still in use to this day - was the backward-tuck scheme, as originated with the classic Grumman WWII trio of F4F(-4) Wildcat (not shown), TBF/TBM Avenger (left) and F6F Hellcat (right). Much like an actual bird does, this scheme rotates almost the entire wing simultaneously about
both the above axes - plus the
third perpendicular axis, the lateral - to twirl (properly, to "pitch") the leading edge down, while sweeping the wing in a curving downward, backward and finally upward arc, coming to rest not only parallel (again, more or less) with the fuselage but also
flat against it (or nearly so). To address this three-axis rotation, rather than employing multiple- or universal joints, the system ingeniously combines all the needed contributions (vectors) in a single hinge, which is simply
tilted: raked slightly backward from the vertical and canted outboard significantly. Accordingly, the break-plane of the wing is also canted outboard - not only to allow the rotation, but also such that in-flight stresses from lift serve only to compress/lock the wings more tightly in place.
A more useful wing-fold for carrier storage could scarcely be imagined - note above how tightly the Avengers are clustered aboard an escort carrier - each one practically packing itself up in a crate! Likewise, shipboard helicopters, such as the HSS/HUS Seabat/Seahorse (not shown), while often folding the tail swept-forward, used tuck-back folding for their main rotor ("rotary wing") blades - two folding on each side - while others, such as the SH-3 SeaKing (not shown), appear to have used a combination of tucked folding for the outermost blades, and swept-back folding for the (inboard) remainder.
If even the simplest of the above wing-folding took some engineering before making their appearance in operational use, neither are they trivial to engineer - working, yet still decently accurate-looking -
in miniature. As I have been learning the hard way in, for example, my 1/48 F2H Banshee build, delayed substantially by even its simplest of overhead-folding schemes. Accordingly, the start of a planned Avenger build, with its much more complex and demanding mechanism, has been postponed until I can really get "on top of" just how to design and install these things, (starting) in 1/48 scale.
Therefore, appended below will be references and examples of progress to engineer the best-looking and -working wingfold installations - of all three types, above - in various builds of naval aircraft, going forward. I hope you will find it as interesting, useful and challenging as I do...
Cheers,
-Matty