When I poured hot tea into a cup, the cup shattered after about three seconds. The cup was made of glass. It was pretty thin. How did the glass and the tea react in terms of chemicals. This is a bit odd because wasn't heat applied to sand in order to make glass, shouldn't the glass break up into the reactants that made it?
This is not a chemical process.
Objects typically expand when heated. Think in railway profiles in the summer, think in loosening a stuck nut by heating it with a blowtorch.
However, when the material is under stress and a bad heat conductor, unevenly heating will result in cracking.
While it is a pity for the cup, the breaking of glassware to thousands of rounded (!) pieces upon uneven or punctual (mechanical) impact may be exactly what you want under different circumstances. Think in tempered (toughed) glass used in windows of railroad passenger cars.
On a side note, there's the Bologna Bottle. In the making, these bottles are slowly cooled on the outside - but very rapidly on the inside, which maximizes the stress.
As a consequence, you might use the bottle as a hammer to drive a nail into something, but beware if you drop something in the bottle. Here's a video to demonstrate the effect. (Be warned that there's a lot of screaming kids in it.)