Note that in the type IIA and type IIB string theories closed strings are allowed to move everywhere throughout the ten-dimensional space-time (called the bulk), while open strings have their ends attached to D-branes, which are membranes of lower dimensionality (their dimension is odd - 1,3,5,7 or 9 - in type IIA and even - 0,2,4,6 or 8 - in type IIB, including the time direction).
A simple example of a duality is the equivalence of particle physics upon replacing matter with antimatter; describing our universe in terms of anti-particles would yield identical predictions for any possible experiment.
String dualities often link quantities that appear to be separate: Large and small distance scales, strong and weak coupling strengths.
In fact, the particle momentum around the circle - and the contribution to its energy - is of the form n/R (in standard units, for an integer n), so that at large R there will be many more states compared to small R (for a given maximum energy).
is a constant called the string length and w is the winding number (an integer).
That means if we take type IIA and Type IIB theory and compactify them both on a circle (one with a large radius and the other with a small radius) then switching the momentum and winding modes, and switching the distance scale, changes one theory into the other.
Formally, the location of the string on the circle is described by two fields living on it, one which is left-moving and another which is right-moving.
T-duality can be formally described by taking the left-moving field to minus itself, so that the sum and the difference are interchanged, leading to switching of momentum and winding.
For electromagnetism, the coupling constant is proportional to the square of the electric charge.
This is a reasonable approximation only if the coupling constant is small, which is the case for electromagnetism.
But if the coupling constant gets large, that method of calculation breaks down, and the little pieces become worthless as an approximation to the real physics.
Unlike the T-duality, however, S-duality has not been proven to even a physics level of rigor for any of the aforementioned cases.
It remains, strictly speaking, a conjecture, although most string theorists believe in its validity.