Reflection is the ability of a program to observe and/or modify its structure and/or behavior at runtime. Reflection is dependent on the supporting programming language - please tag the programming language being used when using this tag.
Overview
Reflection is an ability of a program to perform introspection on itself. This usually involves observing and/or modifying its structure and behavior at runtime.
From a theoretical perspective, reflection relates to the fact that program instructions are stored as data. The distinction between program code and data is a matter of how the information is interpreted, and thus is, in fact, arbitrary. Hence, a program can treat its own code as data and observe or modify it.
Caution should be used when using reflection - the modification of a program's entity during runtime can lead to hard to detect bugs which are generally severe.