If you have an open order which has not yet been matched, you can cancel it by going to the Open Orders page and clicking the "Cancel" button next to the order you want to cancel.
Note that you can also go to the relevant contract and go to the Trade tab to cancel your order from there. From the contract you will be able to cancel multiple orders at once.
Once your unmatched order has been cancelled any funds frozen to cover your position will be unfrozen.
If your order has been matched and you want to change your position, you can sell shares you bought (or buy shares you sold).