How can I keep my paint brushes long lasting?
Awaiting more specific information, I can already tell it's best to rinse your brushes directly after every use. Whether it's oil or acrylic you're working with, the brushes can easily be cleaned with a little soap and water. I use general hand soap bars for this - nothing fancy: don't be persuaded by the overpriced "artist soap" (but more on that later on).
I leave my brushes in a jar with soapy water at all times. I fixed a spring on top of the jar to hold the brushes, so that the bristles don't get squished as they dry, preventing deformation.
You can adapt the spring from a spring holder like the one here:
Using a jar instead of a tin allows for more soapwater, slower evaporation, and fewer refills.
When the paint has dried up already, I usually either soften it up again in that same jar - but you have to wait for days if not weeks (depending on the size of your brush) - or use a small hammer to hammer the paint out (this I only really do with acrylic paint). This is bad practice for high-quality brushes, but with those you wouldn't let it come this far in the first place :) And, nevertheless, a usable bad-quality brush is still better than an unusable high-quality one.
What are best types of paint brushes?
That is a different question altogether, but, in the light of your main question, the brushes with the greatest longevity are usually those with plastic (nylon, polyester) bristles, as they are less easily damaged.
Natural hairs usually paint better (depending on the paint you work with, your style, the size, etc., and high-quality acrylic bristles are improving), but they are more susceptible to degradation, as organic fibers tend to be, so you have to make sure you take good care of them.
If you're starting out with painting, I'd suggest using hog hair bristles for oils and synthetic brushes for acrylic paint. They are both cheap and relatively resilient, and abusing or losing them while getting used to the painting process won't be the proverbial end of the world.