NLP involves the understanding and generation of human language, focusing on linguistic aspects such as semantics and syntax. On the other hand, text mining involves the extraction of useful information and patterns from text documents, often using statistical and machine learning techniques, without necessarily understanding the language itself.