TikTok Interview Question

What is multithreading and how do you prevent deadlock?