A Test Plan is part of Microsoft Test Manager, which is a tool for creating and running manual tests, and managing test/lab environments. Nothing to do with code, unless you're converting manual tests to automated tests (even then, the Test Plan isn't an important piece of that process).
A Test Plan is simply a container for Test Suites, which are in turn containers for Test Cases. Each level represents a finer degree of granularity, and each level has it's own associated metadata. This allows you to create sophisticated reports at various degrees of specificity.
Some examples of test plans:
- In Scrum, teams typically have a single test plan per iteration
- In traditional project test plans may be organized around functionality or layers
There is a lot of metadata (builds, configurations, environments etc) that you can associate with a test plan, but when you get right down to it they are just containers for test suites, which are containers for test cases.