The magnetic coupling between two concentric mesoscopic superconductors with nonzero thickness is studied using the nonlinear Ginzburg-Landau theory. We calculated the free energy, the expelled field, the total field profile, the Cooper-pair density, and the current density distribution. By putting a smaller superconducting disk or ring in the center of a larger ring, the properties change drastically. Extra ground-state transitions are found, where the total vorticity stays the same, but the vorticity of the inner superconductor changes by 1. Due to the magnetic coupling, the current in the external ring exhibits extra jumps at the transition fields where the vorticity of the inner superconductor changes. In this case, for certain temperatures, re-entrant behavior and switching on and off of the superconducting behavior of the rings are found as a function of the magnetic field. A H-T phase diagram is obtained for the situation where the inner ring has a higher critical temperature than the outer ring. An analytic expression for the magnetic coupling is obtained for thin rings and extreme type-II superconductors.