[very] basic question

Apologies if this is not the right forum for such a basic question,

Could someone explain the difference between types & sets?  The maths
texts I have available (undergrad comp. sci. stuff) state their
equivalence explicitly, yet many writings I've looked up on the web
differentiate between them.

I'm guessing that the equivalence applies only up to a point, after
which the theories diverge.  But I can't find anything to explain the
divergence point (if that is the way to think about it).

Any pointers would be much appreciated.  I don't have a heavy background
in either maths or theoretical comp sci - more the humble programmer
with an interest in learning the theory behind the stuff I use.

Many thanks,