Fin rot is a bacterial infection that attacks the betta's fins and eats them from the outside inwards. The bacteria are opportunistic, meaning they are always present in the water but will only attack if your betta has a weakened immune system (caused by improper water conditions) or on open wound.
Usually fin rot can be smoothed out with frequent water changes, maintenance of a proper temperature (ie 78-82 farenheit) and a pinch of aquarium salt. For more aggressive strains that do not improve with warm, clean water and salt there are always antibiotics like Jungle Fungus Clear or Maracyn.
*It is not uncommon for aquarists to refer to bacterial infections as 'fungus'. Don't let this throw you. True fungus in aquaria is actually quite rare and most diseases know as 'fungus' are actually bacterial. For instance the disease Columnaris is also known as 'Body Fungus' despite the fact that it isn't a true fungus.