Pregunta de entrevista de ByteDance

How do threads work in programming?