Quantum Spin Hall Effect and Topological Phase Transition in HgTe Quantum Wells