Homelessness is a growing problem for children and teens, and it is having long-lasting effects on their mental and physical health.

Each year millions of kids and teens wake up in a place they can’t call home. For some, their bed is in a shelter. For others, it’s in a car or on the street. Homelessness can have lasting effects on the physical and mental health of young people for many years to come.

“Homelessness is a traumatic experience for people because they lose everything. They lose their routines, privacy, friends, and pets,” said Dr. Ellen Bassuk, associate professor of psychiatry at Harvard Medical School and founder of The National Center on Family Homelessness. “They’re in situations where they don’t know where the next meal is going to come from, or where they’re going to be tomorrow,” she said.

Find Out More About Teenage Depression: »

In a report card on the state of youth homelessness in the United States, the Department of Education estimated that 2.5 million children lacked a permanent home at some point during 2013. This represents an increase from 1.5 million in 2006.

“If you walk into a public school classroom,” said Bassuk, “one kid is going to have been homeless or is currently homeless. That’s very high.”

The full extent of the problem, though, may be much larger. Homelessness makes it difficult to track youth. They may be living on the street, couch surfing, or moving from one city to the next as the seasons change.

“It’s such a hidden population,” said Dr. Niranjan S. Karnik, associate professor of psychiatry at Rush University Medical Center and the medical director of its Road Home Program for veterans and their families. “People walk past homeless all the time in their lives. A lot of homeless youth are visible, but invisible.”

Homeless youth don’t always look like what some people have in mind when they think of a “classic” homeless person. They may go to school. They may be relatively well-dressed. In many ways, they’re doing their best to hold onto the small routines that people with stable housing may take for granted.

When researchers talk about homeless youth, they are quick to point out that this is not a uniform population. Some kids end up living on the street by themselves. This can result from financial problems in their family, alcohol or drug use by a parent or guardian, or physical or sexual abuse in the family or community. This group of homeless, though, does share one thing in common.

“They’re young,” said Bassuk. “Some are younger than 10, but they’re on the streets alone.”

Children who live as part of a homeless family may have more emotional and financial support, but homelessness is still a hard life.

“Families are relatively more of a protective situation,” said Karnik. “But trying to have some degree of normalcy, in the face of going back to your car or going back to wherever the family is sleeping, can be very difficult.”

Related News: When Is Teen Bad Behavior a Sign of a Serious Problem? »

In addition, a large number of unaccompanied homeless youths are lesbian, gay, bisexual, or transgendered. According to the National Gay and Lesbian Task Force, this group makes up 20 to 40 percent of homeless youth, compared to 3 to 5 percent in the general population.

Karnik said this group is at greater risk of engaging in high-risk behaviors, such as sex with multiple partners. This behavior also increases their risk for HIV, other sexually transmitted diseases, and violence.

“In and of itself, homelessness is a very stressful event, both physically and psychologically,” said Karnik.

In one study published in Child Psychiatry & Human Development, 70 percent of homeless children said they had had unprotected sex in the past three months. Homeless youth also start having sex at age 12 or 13. This is two to three years earlier than adolescents living in stable housing.

As a result, “They can be at much higher risk for HIV and other sexually-transmitted infections,” said Karnik, “largely because they are often engaging in sex work or sex trade to survive.”

Read More: How Childhood Violence Affects Adult Brain Structure »

Other common health problems homeless youth experience are skin and respiratory diseases, such as asthma and pneumonia. They get these diseases while living in crowded shelters or on the street. They may also have dental problems from lack of access to a dentist.

Homelessness also affects children’s nutrition and brain function. These kids depend on meals served in shelters and soup kitchens, as well as subsidized school meals.

“Young children who are homeless, or families that are homeless, but also kids who are in the developmentally sensitive period during their teenage years who are homeless, probably suffer from poor nutrition and access to food on a regular basis,” said Karnik. “That will most likely affect their cognitive development.”

Because the brain develops rapidly during childhood and adolescence, factors that shift this process can lead to long-lasting negative effects. Drugs, alcohol, and stress can also change young people’s brains.

Research from Harvard University suggests there’s a tipping point where everyday stressors become “toxic” and change how the brain develops. These stressors include emotional abuse, substance abuse, or mental illness in a parent or guardian, chronic neglect, and financial hardship in the family.

“If you’re living in poverty and you’ve been exposed to homelessness,” said Bassuk, “it’s easy to reach the threshold.”

One of the largest problems for homeless youth is mental health issues. This includes substance abuse, which affects between 70 and 90 percent of homeless kids and teens. While alcohol and drugs, including marijuana, may contribute to homelessness, youth may also turn to these substances to help them deal with living on the street.

“The common belief among these youth is that these things help them with their anxiety and sleep,” explained Karnik.

Homeless youth also commonly experience mental health issues such as suicidal thoughts, depression, anxiety, bipolar disorder, and post-traumatic stress disorder. The roots of these problems, though, may have been planted well before the children and teens became homeless.

“A lot of these things, like the post-traumatic stress, can be connected to violence they’ve experienced while they have been homeless,” said Karnik. “But a lot is more complex trauma, like trauma they had early in their lives, either in their homes or their communities.”

When you look at the mental and physical health problems faced by homeless youth, it’s clear the short-term effects are significant, but even those pale in comparison to what will happen decades from now.

“When you reach a certain threshold of traumatic exposure in childhood,” said Bassuk, “your long-term outcomes, such as your mental health and medical outcomes as an adult, are terrible. You reach this threshold and, in a way, you’re sort of doomed.”

Bassuk believes that with the right support and resources, the problem of youth homelessness can be solved.

“You need to stabilize the housing. From there you have to start dealing with some of these other issues, such as the health and behavioral health issues, which are very present,” said Bassuk.

There is debate among advocates about whether the federal government has done enough to fund programs to address youth homelessness, but the issue cannot be ignored forever.

“The country cannot be healthy when you have this many kids whose lives are fragile and living on the edge. Even more than that, these are innocent young children and they deserve to have a life,” Bassuk said.