Command line arguments are passed to the main method when a Java program is executed from the command line. They allow users to provide inputs or parameters to the program without modifying the source code. Command line arguments are represented as strings by default.