Firstly, don't panic! The liver is a remarkable organ and can regenerate and recover very well and very quickly,so hopefully whatever it is will be easily treatable.
The one thing the liver can't recover from is alcoholic (and a few other poisons) liver damage; when it has passed a certain stage; it is irreversible. Most other things will recover with time and the correct treatment.
In the meantime, help your liver; no alcohol etc, google liver damage and see what all to avoid to give your a kick start. It may be that there is nothing, or very little, wrong. Hope that is the case.
Good luck.