If you buy them, then you can keep them forever, though they will only play on devices that are authorised to play them. It's generally possible to strip the DRM out of them so they'll play on anything, though often only if you keep a slightly out-of-date copy of iTunes.
If you rent them, you have 30 days to start to watch them, and once you've started you can keep them for 24 or 48 hours (depending where you are) and then they won't play any more.