Hello Hie,
that is a general Node.js question, and I suggest you to ask it using more appropriate channels like Stack Overflow.
This forum is for questions specifically related to the MySQL X DevAPI connector for Node.js.
In it's most basic concept, Node.js is single threaded because it uses an event loop to handle asynchronous work, in particular blocking IO tasks, which ensures the main thread is never blocked on a given process.
There are multiple resources online that describe how the event loop works in the scope of JavaScript). I would personally recommend the following video to get a better grasp.
https://www.youtube.com/watch?v=8aGhZQkoFbQ
Nowadays, Node.js actually supports using threads within a process:
https://nodejs.org/dist/latest/docs/api/worker_threads.html
These threads (also known as workers) are more useful for performing CPU-intensive operations in JavaScript.
Hope it helps.
Thanks
Rui