There are many definitions out there for what counts as legacy software. For a long time my favorite was from Michael Feathers, which was something along the lines of “any code that does not have tests”. “They are writing legacy code!” I have a new, related definition that seems to fit well too.
Any piece of software that nobody any more remembers what it does, or how it does it. Parts of the software that are not a part of anybody’s current memory. The original author has left the company. Perhaps he or she is still at the company, but has simply forgotten about it. Only so much fits in your head at any time, and things get cycled out.
Having tests on a piece of software can help you see more clearly what the thing does, and can help point you in the direction you need to go for your current task. Good documentation helps. Comments in the code sometimes helps (though these can just be clutter too). Having somebody to talk to about the code that knows it is not just helpful, but invaluable.