The basal ganglia are a set of subcortical nuclei that form a key loop with the cortex and thalamus. Their core function is action selection — gating which motor programs (or cognitive/behavioral patterns) get executed and which get suppressed, via the direct (go) and indirect (no-go) pathways.
The dopaminergic projection from SNc modulates the balance between these pathways, which is why dopamine depletion in Parkinson’s leads to motor suppression and rigidity.