It is not possible to convert a contract from hourly to fixed-price (or vice versa) after hiring. If you are considering this, be sure to come to an agreement with your freelancer on the new payment terms before making any changes.
To change the type of contract, simply end the job and rehire the freelancer, changing the offer terms to an hourly or fixed-price contract, as appropriate. If the current contract is fixed-price, you should complete the current milestone before ending the contract. You'll both have 14 days to leave feedback on the ended contract.