You'll need to contact Sprint for an unlock code, which they can give if your account/phone is eligible. Here's a grood explanation I saw on tom's guide:
"Unlocking HTC One from Sprint
Sprint offers two ways to unlock your HTC One, namely:
Domestic SIM Unlock (DSU) – When your HTC One phone is unlocked for DSU, it can be used by the different carriers that are only domestic in US. No international SIM can be used in such situation.
International SIM Unlock (ISU) – ISU, on the other hand, allows your HTC One phone to work only with international wireless carriers (and not with domestic ones). You may want to go for ISU when you plan to stay out of the US for an extended time period.