Nothing special happens in the background.
Implementing the Runnable interface ensures that your class has a public void run() method.
The magic really happens when you pass your custom class to Thread .
Thread th = new Thread(new YourCustomRunnable()); th.start();
In the above code, a new Thread will be created, and the code inside the run() method will be launched in another thread.
Internally, the thread will call your own run() method and make this code run in a separate thread. Technically, you can do the following:
Runnable r = new MyCustomRunnable(); r.run();
In the above code, r will not work in a separate thread.
source share