Pot plants usually die (in the first few years of life) because you water them either not enough or too much. Compost should be slightly damp but not so that you can pinch a bit and squeeze water out of it. Make sure the pot it's actually in has holes in the bottom and sits in preferably a saucer or possibly another larger pot. There should not be water sitting in the saucer – there can be when you water it but it should all go within 10 mins ish. If there's any sitting in there then empty it out. Especially important to check this if the pot sits inside a larger decorative pot – you can have water sitting down there and not notice it. So lift it out to check.
Some plants like full hot sun, but for many bright blazing sunlight is too much, so back them off from the window a bit in summer. In winter they might like it.
Don't move them around too much too quickly tho, they have to adjust to a change in conditions.
After several years feeding or repotting becomes important as the plant eats up all the nutrients in the soil. Although it will always appreciate feeding – but follow the instructions – don't overfeed.