You can go on the contract page, click on the button 'Cancel Contract' and confirm with 'End Contract'. On the page after, you'll be prompted to leave feedback and make any final payments. You can choose to pay the full amount, another amount (amount field will open after selecting), or pay nothing and request a refund. If the amount you want to pay is less than the deposit, the freelancer will receive a refund request. Feel free to check out this help article for more information.