You get a clearance by having your employer or client sponsor you. It inactivates when you switch jobs, but can be reactivated fairly easily within 24 months. Beyond that, you need to be re-investigated. Standard Form 86 [1] lays out the information you need to provide.
[1] https://www.opm.gov/forms/pdf_fill/sf86.pdf