Will at the older Lego Caboose (10014) work with the Lego Cargo Train (7939)? I wonder if it will fit the newer track and if the magnet couplers will still work?
As a general rule, the rolling stock from all LEGO trains will work with all types of LEGO track. So, the Caboose you've mentioned will work perfectly with the track supplied with the Cargo Train.
There are a couple of exceptions to this rule:
Electrical components are a different matter. Trains that need a powered rails obviously won't work unless they're running on compatible track. So, the old mains-powered 4.5V, 12V and 9V engines won't work on modern track unless you replace the motor (which can be non-trivial).
Most battery powered trains will be fine on all types of track, although the very early trains had small teeth on their wheels to give them traction against corresponding notches in early track. Although they'll certainly fit the modern track, you might find that they don't run very well unless you swap the wheels.
The couplings on LEGO trains have always been at the same height, so there are no problems there. The bottom line, then, is that the couplings on the Caboose will work well with the Cargo Train.
The magnetic couplings are generally compatible with each other, so you won't have any problem there, either. The first magnetic couplings were polarised - north and south (red and blue) - so you had to make sure the wagons were the right way around on the track. 9V era trains had magnets that flip round, so they would work whichever way around they were, and were completely compatible with older polarized couplings. The very latest couplings don't swivel in the same way, but are reportedly backward-compatible with all older couplings.
(Of course, the early non-magnetic couplings are incompatible with the magnetic ones, but can usually be replaced with a magnetic coupling without too much difficulty.)
The one problem that some people have encountered with magnetic couplings is that they don't always hold together if the wagons are too heavy. This can happen if your train is too long, for example.
The Caboose will work well with the Cargo Train.