OK, cacti are something of a hobby of mine; I've got about 70 different kinds, plus a whole lot of other succulent plants which aren't related, but which require similar conditions.
First of all, the only way you're likely to kill a cactus indoors is through overwatering. If in doubt, don't water! Leave the plant till it's dry. (It helps in this regard to have a free-draining compost with grit or sand in it - not a peaty compost). That's basically it as far as keeping the cactus alive - you should actually water quite often when it's hot, to help the plant grow, but make sure the soil dries out between times. Saturated soil rots the stem. On the other hand long periods of neglect won't be good, but probably won't kill it.
Now to keep it looking nice, and maybe getting it to flower. Most cacti like a resting period in the winter, (especially in Scotland!) when you can probably get away without watering at all for several months. This may help encourage flowering, though it must be said it's usually the small round kinds which flower easiest rather than the taller kinds. In winter, if you keep it dry, you can keep it really cool, even cold, but frost free. In the summer cacti will benefit from full sun, but bear in mind the skin can burn under intense heat and leave unsightly marks. Apart from this watch out for mealy bugs (cotton woolly like masses) which may weaken the plant.
These are the main points Seeker7. Water, but never overwater. Preferably cool and dryish in winter, and in bright, but not burning, sunlight in summer.