It depends on the device.
You need an upgrade for your phone/tablet model - there is no generic, device-independent android you can install, the software has to be built for the device. If the manufacturer (or network) has built an upgrade for your device you'll find it in Settings > About > Software Updates.
However, 2.2.1 is really old, which makes me suspect that there isn't an official update. You might be able to do an unofficial update if somebody has built one for your device (a "custom ROM"), but if that exists you'll have to root the device to install it. The procedures for this also vary between devices, so not knowing what device you have I can't tell you how to do this. I'd start by searching to find out whether a suitable ROM for your device exists first - do not try to install a ROM that's been built for a different model, even one that's similar and made by the same manufacturer, because this will not work and your device will almost certainly not even boot up if you do.