As with most materials, glass expands when heated and contracts when cooled.
This contraction occurs in glass simultaneously with the change from a softened to solid state. If the contraction and stiffening do not happen evenly throughout then the glass is left with residual stress.
The controlled cooling of glass in order to reduce undesired stress is known as annealing.
Annealing cannot, though, reduce or eliminate stress that results from fusing incompatible glasses.