The finally clause in Java is used to specify code that is always executed regardless of whether an exception is thrown or caught in the try block. Clean-up code, like closing an open file or database connection, is commonly placed in a finally block to ensure it runs even if an exception occurs.