WHY? Why are you slim? There are medical reasons why you might be too small, metabolic (thyroid), genetic, parasites, not using the food you eat (malabsorbtion), just for starters see your doctor why do you think you are too slim maybe you are where you should be why do you want to be "fat" being too fat can have medical consequences (heart disease, high blood pressure, arthritis) ask your doctor.
Diet and muscle mass. To gain weight you have to consume more calories than you are burning. Do this in a healthy way though. Don't choose junk or fast food. Keep a well balanced diet and make sure you are getting all the nutrients you need. Don't cut out exercise as it is very good for you. Weight lifting and other muscle building exercises can help you increase your body mass.