Having identical twins is not genetic. On the other hand, fraternal twins can run in families. Genetics can definitely play a role in having fraternal twins. For example, a woman that has a sibling that is a fraternal twin is 2.5 times more likely to have twins than average!
Double-oval twins are generally maternally inherited, and monozygotic twins are not related to heredity. If the woman is one of the twins, the probability of giving birth to twins is higher than that of the husband who is one of the twins, suggesting that the mother’s genotype is more affected than the father’s.