When is a set of emails an email thread?

How do you know when a set of emails is an email thread? Like, what parameter do you evaluate whether you have an email thread or not?

Do you use the Reference and Message-ID fields to check if you have a thread or not? Or what do you do?