CPU Affinity sometimes refers as CPU pinning enables a particular process or a thread to use one or more Central Processing Unit, it depends upon the number of CPU configured in your system. It enables particular thread or process to use only configured CPU rather than any CPU that's configured in your Operating system.
CPU affinity is really helpful in a scenario where you have multiple CPUs installed on your operating system and multiple applications running on the system such as SQL SERVER, SQL Server Reporting, SQL Server Analysis etc. Being DBA or SA you are noticing that SQL Server Reporting services are using almost all the CPU and all other applications are running really slow. You can/should configure SQL Server Reporting or any other CPU intensive application to use may be One out of 3 CPU available so that other applications can share CPU resources equally. Please configure according to your configuration, above example is just used for illustration purposes.
You can bind particular process to a particular CPU making sure other applications are not impacted due to CPU hog applications. Please see my post how to configure CPU Affinity step by step.