Joint custody

How does joint custody work when you live in different states? My ex is threatening me with our child. My son lives with me and I️ take very good care of him and my ex treats me like shit always has and his dads a lawyer and he’s saying that he’s going to get joint custody. I️m nervous I’ve never once told him he couldn’t see his son or anything.