I just bought an Xperia x10. How can I check what version of Android it has?
Settings -> About phone -> Firmware version (or similar).
On the HTC Desire (and probably most HTC devices)
Settings -> About phone -> Software information
Look at settings about device or phone or tablet, press android version again and again. If it's Jelly Bean a jelly bean face will be shown, if it's KitKat a K will be shown.