Im 24 year old male weight 46 height 5.7 inch what should i do for a gain weight nt by eat.

I start gym for fitness. but i don't know it right way to gain weight and how much time it take and what exercises i should be do.what u say about Health Supplement it good or bad for health .............???