A thread is an independent path of execution inside your program. By default, Java runs everything on a single thread. If that thread performs a slow operation like reading a large file, your entire program freezes until the operation finishes.
You can create a second thread to run code in parallel:
Thread t = new Thread(() -> {
System.out.println("Running in a separate thread");
});
t.start();
The start() method launches the new thread. Both threads now run at the same time. If threads modify the same variable without coordination, you get a race condition where the result depends on timing. Java provides synchronized blocks and the java.util.concurrent package to prevent this.