Is it true that giving birth to twins is hereditary?

Yes. It can be hereditary, mainly maternally. However, twins days days result from fertility treatment.
Yes. There is a gene that increases the chance of fraternal twins. This is not the most common reason for twins, though, so for most women twins is a random event, occurring about 1:100 pregnancies. Fertility treatment, of course, can increase this risk. Identical twins are not related to any gene.