Basically, the principle is similar to a roll-on roll-off car ferry, with a link span that can move vertically to cope with tides. It helps not to have too great a tidal range!
The Dover-Dunquerque route used a different principle, there was not really room at Dover at the train ferry berth (just to the north of Marine station) for a long linkspan, given the large tidal range, so it had a single lock gate, the vessel manoeuvred in reverse into this, the lock gate went across, and then there was a steam-powered pumping plant alongside which equalised the impounded water level to the approach tracks. It took a while if the tide was at extremes.
Other rail facilities, such as from mainland Italy across to Sicily today, do indeed use the same linkspan principle as car ferry terminals. The tidal range in the Mediterranean is a lot less.
Previous train ferry services across the Channel, which had existed on and off since WW1, just had a tidal timetable. There is a mid-tide every 6 hours or so and the vessel just loaded and unloaded at that time, which works for freight but not a daily timetabled passenger service. This is actually relevant to boat trains because in the 19th Century, before harbour improvements, the passenger services were different each day due to tides. It was a misreading of that day's timetable by platelayer staff that led to the major Staplehurst accident in 1865 in which Charles Dickens, returning from Paris, was a passenger, who later wrote a well-known account of it.