There's a hole (always open) in the side of the engine nacelles. There's a small latch inside there. The interlock strut swings up from the side of the main gear strut and hooks into the latch in the hole. Thus, the landing gear is actually attached to the sides of the fuselage for a carrier landing. (It happens regardless of where the plane actually lands and is an automatic part of the "gear down" sequence). When the gear retracts, the interlock strut simply swings down 90 degrees to disconnect from the fuselage latch and lays flat alongside the main strut.
Here's the left one (not my pic, but of a plane I did photograph a few weeks earlier)
