A yogi can get married or live at home, but he will concentrate on practice most of the time. If they leave home, they will really leave home to go to a temple, or go to a remote place to practice their lives instead of getting married and having children.
Although yogis also belong to the category of practice, they are not monks, and they cannot participate in the activities of monks.
This is also the difference between a yogi and a monk. If a yogi has more constraints on himself, he is just like a monk. If you shave your hair, your appearance looks not much different from that of a monk, but your activities may be very different.