How do I legally get out of my parents house and live with a friend's family?

You either have parental consent to move, is emancipated by the court (if your state have that option), emancipated through marriage or is emancipated by turning 18.