if you have a rooted phone
twrp installed
if you do a factory reset, does twrp stays installed?
Yes. A factory reset works on the data partition. TWRP is on the recovery partition.
and you can allways go back to a backup?
Not only if you do a factory reset. I bootlooped my phone this evening. (I'm playing around with a few ROMs.) I flashed the stock ROM, rooted, installed Safestrap (which is basically TWRP for phones with locked bootloaders), restored my backups and the phone is sitting there now, with the system it had this morning, before I started fooling with it.
I usually do one system backup, then data backups every week or so, depending on how much data and how many apps have changed. It's faster, and it takes less space, to have a few data backups than to have a few data+system backups.
when you flash any rom, does twrp stays installed?
No, the ROM can install its own recovery. Then you have to install TWRP again.
and you can allways go back to a backup?
As long as you can instal TWRP - and the phone isn't a welded-shut Samsung (AT&T or Verizon). Install TWRP, restore your backup, feel stupid for doing what you did that messed the phone up, but you're back in business.
or when you flash lets say a original rom, you cant go back anymore to your backup?
That's exactly what I had to do today - flash a stock ROM, root it, install busybox, install Safestrap (or just install TWRP in your case) booted to recovery and restored my backup files.
With a phone that you can install TWRP on (or run Safestrap on and you have a good ROM to flash), if you have a good current backup, about the only thing that can keep you from getting your phone back is a hardware failure. Mess it up all you want (like a 4.4.2 kernel and a 4.4.4 ROM - it boots to a black screen) and it's not a problem, it's just a pain and a waste of some of your time. I'd guess that I've soft-bricked my phone about 10 times this week. TWRP (via the Safestrap route, in my case), restore, kicked myself for making the same mistake a few times, but no problem. You really have to hard-brick the phone (it does the same thing with or without a battery in it - nothing) to possibly have a problem. (Some hard-bricked phones can be booted into download mode from the SD card, or with a dongle with some Samsungs - then you download a ROM and start putting things back together again.) It's really difficult to put a phone into an unrecoverable state by just doing a factory reset or flashing a ROM (unless it's a ROM for another phone - that could cause an Excedrin headache).