What causes ulcerative colitis? Is it contagious?

Autoimmune. Uc or ulcerative colitis is an autoimmune disorder which typically responds to steroids and other immune modulators as imuran (azathioprine). It is not contagious. Complete proctocolectomy with ilioanal j-pouch pull-through "cures" the disease, though backwash ileitis is a common finding on colonoscopy...
No. It is not contagious but may run in families. There are numerous theories as to the causation, but no real consistency from one patient to the next.