We ask the database to cancel a query via the thin client JDBC interface.
It's then up to the database to cancel said query/process.
You may have a slightly better experience with canceling queries if you use the OCI/THICK option for your connections. This is enabled via the Preferences > Database > Advanced page. It will require you have an Oracle Client installed - although the 'lite' Instant Client will perfectly suffice.