I have 3 trailers and have previously owned a fourth (which was my first) each of which has had a different attachment mechanism.
You have 3 issues to address:
- Attachment to the bike
- A "quick" release mechanism so you can, if you want, separate the bike from the trailer
- Achieving a universal joint of some sort (or at least sufficient degrees of freedom to avoid any unpleasantness
The crudest connection I have is for my shopping trailer (a Christiana from Denmark) - this is a substantial lump of stiff rubber that has a hole for the seatpost and a long "tongue" that goes to the trailer drawbar over the back wheel of the bike, there's then a pin through the drawbar to hold it in place. This is not a particularly elegant solution, but it works. You get rotation of the rubber round the seatpost and then both up and down and twist from the rubber tongue. I've managed to put the trailer on its side with a combination of a pothole whilst being a bit too keen when the trailer was empty and the bike stayed upright...
The other three all attach to the bike around the rear axle/chainstay.
First was a Winchester child trailer which had a j clamp to go around the seatstay and, I think, something springlike to provide the articulation - not quick to attach/detach but pretty effective when on. Contemporary trailers often use "Weber" connection components for which are, I believe, available for purchase.
Third is the attachement for our Bike Friday Triplet - a plug and socket arrangement, plug clamped very firmly to the rear seat stay and the socket on the draw bar. Right here, right now I can't remember how it articulates (but it does).
Second - and last because its by far my favourite (simple, elegant and effective!) is for my Radical Cyclone. Bike end is a ball on bit of bent metal that goes over the rear axle and is clamped in place by whatever holds you back wheel on already. Trailer end is a polymer cup with a sprung steel cap to hold it in place. You can see both on their accessories page. I've used this trailer for touring - you barely know its there apart from the fact that you go more slowly (even more slowly in my case).
All of the above work more than adequately well. Articulation can be provider by a ball and socket, by a universal joint - multiple "hinges" (this is how a BoB trailer works horizontal through the axle, vertical at the trailer and no need for "twist" to cope with the lean of the bike as its single wheel and therefore will lean with the bike) or by having something that will physically bend and twist (spring, rubber).