Anybody know how twins work?

My boyfriend is an identical twin and my dad is an identical twin. We were trying to figure out the chances of us having identical twins but we know nothing! We are unsure if it runs in families or happens by chance, if it runs on the females side of the family, etc.

thanks!