First, there are different of text similarity: lexical (using mostly same words), semantic (talking mostly about the same topics), stylistic (written mostly in the same style, possibly by the same author), etc.
I'm assuming the most standard case, i.e. that you're looking for some kind of semantic similarity. There are different methods:
- Probably the most simple would be to represent the two texts as TFIDF vectors and use cosine TFIDF to compare them. Mind that preprocessing options can have a huge impact, for example filtering out low frequency, lemmatizing, etc.
- More advanced methods would represent the two texts as embeddings and compare these vectors. This requires pretrained word embeddings and would require more computation.
Anyway there is no binary answer, text similarity is typically considered continuous. This makes more sense, because there is often no clear answer: different people may not agree whether two texts are similar or not.