Glioma is a complex tumor composed of both neoplastic and non-neoplastic cells, including tumor-infiltrating leukocytes (TILs), and each cell type contributes to tumor formation and malignant progression. Among TILs, tumor-associated macrophages (TAMs) are of great importance and play a key role in the immune response to cancer. In this study, 22 types of adaptive and innate TILs were evaluated in gliomas. TAMs, which account for 38.7% of all these cells, are the most abundant immune infiltrates in the tumor microenvironment. In addition, we observed different immune cell patterns in low-grade glioma and glioblastoma. Our research indicated that there was a connection between TILs, and 13 of 22 TILs were significantly associated with patient outcomes. Finally, the prognosis and diagnostic value of TAMs were revealed using Kaplan–Meier analysis. We identified the optimal cutoff point of TAMs at an infiltrating level of 0.47 to predict patient prognosis, with a median overall survival of 448 days in patients with higher TAM infiltration levels and 2660 days in patients with lower TAM infiltration levels. These findings provide a new idea for glioma to regulate tumor-specific immunity, clarify the potential effects of TAMs on disease pathology, and provide a theoretical basis for immune intervention treatment of gliomas.