If an app is written for Android 2.3 will it run on 2.1?
It depends. If an application uses features present in Android 2.3, then it will not work on 2.2 or lower. If it only uses features present in older versions, then it will work on those older versions.
For example, an app written for 2.1 (i.e., an app that only uses features from 2.1 or lower) will work on 2.1, 2.2, 2.3, 3.0, and 3.1 (and any future versions, unless Google changes how things work).
Internally Android uses so called API levels to distinguish between the various Android versions. An app records two (actually three, but this doesn't matter here) API levels within it's manifest:
These levels can differ when, for example, the App uses a feature of a higher API level only optionally. E.g. the access to the front facing camera came with 2.3.3. If the App runs on a older version (API level) it can only access the rear camera. But the app will be installable and runnable.
So yes, if a app is written for a higher Android version it could run on a lower, but only if the app developer took care of that.