How do glial cells help the brain function?

There are different types of glial cells and they each have a separate function. You have astroglia, microglia and oligodendroglia. Some are for structural integrity, some for cleaning up debris and some are used to make myelin.