In the US, a student typically writes a thesis to earn a master’s degree and a dissertation to earn a doctorate. Many other parts of the world, such as the UK, use these terms in reverse. In reality, there isn’t much difference between them beyond the degrees for which they’re written.