Weight can be influenced by genetics, but it really has a lot more to do with your diet, how active you are and your lifestyle, not your genes. So yes! You can put on weight if you're really skinny and you can become 'chubby'. But if you plan to do this, please do it sensibly: Don't just eat junk food because that'll clog up your arteries and cause all sorts of health problems. You can put on weight buy simply eating larger meals and do a bit less exercise.
Genetics plays a role to some extent but you don't have to overeat to get fat. Eating the wrong foods can make you fat, such as eating white bread and pasta all the time (even if they are normal portion sizes), (eat grain breads and grain pasta, stay away from boxed mac and cheese, ready made meals, and other boxed junk like instant mashed potatoes), and drinking sugary drinks is also a weight gainer (it's best to drink water only).
some people who were skinny when they were younger get bigger as they get older because their metabolism slows down.
I'm guessing you'd like to gain weight?
If you're looking to gain weight healthily, without eating garbage simply for the extra calories, I highly recommend this Youtube channel. Awesome tips for those who want to bulk up.
www.youtube.com/channel/UCwxklfO1LBHPdkcUkzY9duQ