Sb$_2$Te$_3$ is a very interesting material for rewritable optical media. We study of the switching mechanism between the amorphous and crystal states theoretically.