In Massachusetts most of the time Judges in Probate and Family Court determine the custody, parenting time or visitation.  These are involved through divorces, paternity, legal separations and the like. There also can be other exceptions where a 209A or a restraining order in district court might have jurisdiction at least for a time regarding custody or juvenile court with DCF cases or potentially adoptions may also have custody determinations.