Say you have a 14 year old daughter that has recently birthed a child. Obviously, you cannot kick your own kid out, but what about the kid's kid?
A parent is responsible for supporting their minor child, therefore they cannot "kick out" their child (they can arrange for someone else to take care of the child but they are financially responsible for this arrangement). This is true even if the parent is a minor. In that case, the grandparents and the parent (who is herself a minor child) are both responsible for the grandchild. We can turn to NCGS § 50-13.4(b) which states the hierarchy of responsibilities:
In the absence of pleading and proof that the circumstances otherwise warrant, parents of a minor, unemancipated child who is the custodial or noncustodial parent of a child shall share this primary liability for their grandchild's support with the minor parent, the court determining the proper share, until the minor parent reaches the age of 18 or becomes emancipated. If both the parents of the child requiring support were unemancipated minors at the time of the child's conception, the parents of both minor parents share primary liability for their grandchild's support until both minor parents reach the age of 18 or become emancipated.
The details could be different in another jurisdiction.
Obviously, you cannot kick your own kid out
Not at all "obviously". Youth homelessness is absolutely a thing, and a major cause is a breakdown of the relationship between the child and parents. Sometimes this is the child actively running away, sometimes it's the parents actively preventing the child going home.
In the UK, local government are responsible for children's care. There are separate schemes for children under the age of 16 (who cannot legally live on their own) and children between 16 and 18 (who can). In theory, local government has a duty of care to all children living in that geographical area which supersedes parental responsibility. Services such as fostering exist to provide care for children who, for whatever reason, cannot live with their parents.
In practise, these schemes have been chronically under-funded under the Conservative Party's austerity programme since they took office in 2010, resulting in significant harm (sometimes fatally) to many children, due simply to the fact that the resources do not exist to properly check on at-risk children. It may be practically hard for children to access services, and charities such as Centrepoint are often required to provide temporary support and help young people to access the services they are entitled to. Still, these services do exist though, and children have a legal right to them.