TikTok interview question

What is multithreading and how do you prevent deadlock?