A text editor is a program that is used for the purpose of editing plain text files. In the context of this question, a programming text editor is used for writing code and has features that help developers with their tasks, such as auto-indentation or automatic code formatting.
Text editors are often mixed up with Integrated Development Environments (IDE) so it’s important to make the distinction.
Wikipedia defines an IDE as:
An integrated development environment (IDE) is a software application that provides comprehensive facilities tocomputer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger. Most modern IDEs have intelligent code completion.
On the other hand, a text editor has a broader approach, being able to edit any programming language instead of specializing only in one. Text editors are usually able to only write and edit codes but most of them have the ability to be extended by plugins which help developers with things from code completion, to debugging, to automatically formatting their code.
When choosing a text editor one should keep in mind the number of plugins available and their availability. This is important because good plugins increase productivity and development speed considerably.
Some text editors are very fast and minimalistic and portable but still extendable, others are larger, take more memory and are generally slower but have more features out-of-the-box.