The ESP32 has 2 microprocessors:core 0 and core 1. So, it is dual core.
Normally, ESP32 runs on core 1 when we run code on Arduino IDE.
This program will run codes simultaneously on both cores, and make ESP32 multitasking.
Core0 is mainly responsible for the connection tasks of WiFi and MQTT.
Core1 is mainly responsible for all the control logic of the main program.