Does every thread have its main function?
For any reasonable definition of a 'main function', no.
Each thread has to start at some point in the code. For the main thread that is usually called the main function.
Modern programming languages are often designed that when starting a new thread it starts in a given function. You could call that the 'main function' of that thread, but is more commonly called its entry point.
However the entry point of a thread does not have to be at some dedicated function, or even at the start of a function. As a counterexample I would invite you to look at POSIX fork().