How are different parts of the brain identified and what do they do?

How are different parts of the brain identified and what do they do?