How does a 3D pen work

How does a 3D pen work