You can cancel a sales order by viewing the order and choose cancel order from the more options.
If an order has no related shipments, you can delete an order instead. But if any shipment has been posted (even the the shipment is reversed), you cannot delete the order and only can cancel the order.
If an order has related invoices, you must delete the invoice or reverse the invoice before you can cancel the order.
When the order is cancelled, any related shipments will be reversed for you. The quantity on order for each line will be set to zero and the order will be marked as historical which makes it non-editable.