CSF is collected via a procedure called lumbar puncture (LP), commonly known as a spinal tap. This involves inserting a needle into the lower lumbar region of the spine to obtain a sample of CSF. The procedure is typically performed under sterile conditions and may require sedation in pediatric patients to ensure compliance and reduce anxiety.