Simply being that thin, in and of itself, is very dangerous to your health. I hope that you are already under a doctor's care and that you just didn't mention it. If you are, surely a diet has been recommended to you. If not, then please, please get help. I hesitate to even recommend what you should be eating to gain weight, because there is a re-feeding syndrome that can be dangerous. Once a person gets to be as thin as you are, she needs expert dietary advice. I'm glad you want to gain weight, but you need medical supervision in order to do it safely. Please take care of yourself.
If you're losing weight unintentionally, you need to see your doctor. There are some very serious medical issues that cause weight loss/inability to gain.
One is hyperthyroidism (over active thyroid). You need to have some simple thyroid function tests done... those are Free T3, Free T4 and TSH.
Another is diabetes. Blood sugar tests are needed to diagnose that.
Both of these conditions can be present for a while before symptoms show up, so you should get tested asap...