genetic predisposition and environmental factors cause mental health problems - i.e. nature and nurture. all of your questions can be answered if you google the individual parts, and there simply isn't enough room here to 'tell' you about them. after working in mental health for 20 years, i am still learning and see something new every day.
your friend's circumstances will be very individual and unfortunately not unusual - the longest i have known a person to be sectioned for is 27 years...but there has to be good justification for this (that they are a risk to themselves, others and/or cannot be treated another way - at home, for example or required treatment that has to be monitored in an inpatient setting) and these reasons are examined closely by the mental health act requirements at regular intervals to justify continued detention and medical intervention.
you would have to become more involved with your friend if you want to help - consent needs to be gained for information to be shared, families, friend and carers are valuable assets in the recovery of someone who has been so unwell for this period of time...but you may have to face the fact that even with medication, supervision and a lot of support that your friend may never be free of symptoms and cannot be managed in a less restrictive environment - or may be subject to forensic mental health sections (i.e. has been sentenced by a court to remain in hospital until he is deemed well enough and the sentence has expired).
mental health is fascinating and some of the research and publications are riveting to read - for example...if a mother uses drugs during labour, babies are more susceptible to alcohol and substance misuse in later life / forms of dysfunctional communication between parents and developing children are shown to cause schizophrenia (double-bind) / if you have a first rank relative with schizophrenia you have increased chances of developing it yourself (i.e. identical twins 65%...non-identical 40%...parents 20%...siblings 12%...etc.). this is just some of the stuff i have read in the past which sticks in my mind, but there is oodles more out there for you to find.
you could read this stuff all day every day for the rest of your life and not know everything about your friend or the field of mental health, but it is interesting, rewarding and humbling to be around...and i think that understanding mental health and illness makes people more tolerant, less judgemental and better people all round.
i wish you the best of luck and why not try to contact your friend and support him? just make sure you have boundaries to stick to and are prepared to give a certain amount of your time, money and/or efforts, but make sure that you stay ok and have sufficient resources (physically, emotionally and financially). however, do not and never involve yourself in a relationship that costs you too much in terms of your own mental health and wellbeing as you have to make sure that you are ok in order to be able to support others. take care x