1. Download and install the HTC mobile phone drivers. [Windows]
2. Download the root.zip file.
3. Extract root.zip into a directory on your computer.
4. Plug your HTC One X into your computer via USB. Recommended: Plug your device’s USB cable into the back of your computer if you’re using a desktop PC.
5. Enable USB Debugging on your HTC One X. Settings >> Developer Options >>USB debugging (checked)
6. Double click root.bat/root-linux.sh/root-mac.sh to run the script.
See more here