Affinity pulls Pods toward nodes; taints push them away. A taint on a node has a key, an optional value and an effect. NoSchedule stops new Pods that don't tolerate it, PreferNoSchedule avoids the node when it can, and NoExecute also evicts running Pods that don't tolerate it, after tolerationSeconds if they set one.
A toleration on a Pod matches a taint by key, effect and either operator: Equal with the same value or operator: Exists. It only allows the Pod onto the node; to also send it there, combine it with a selector or affinity. That pair, taint the node and tolerate plus select in the workload, is how teams dedicate nodes to batch jobs or special hardware.
kubectl taint nodes NODE key=value:Effect adds a taint and the same with a trailing - removes it. The control plane carries node-role.kubernetes.io/control-plane:NoSchedule, and stale taints left after a project are a common cause of unexplained Pending Pods.
Add, read and remove a taint.