To create a department, go to the Department section on the Company page and click the add + button.
Then, to choose which department(s) you would like your contact to be in, just select them from the Department drop-down in the contact profile.
Your contacts can be in multiple departments - if a department is deleted from the company, it will also be removed from the contact.
You can also easily see the number of contacts in each department, and hover over that number to see the contact names.
To do this, just go to the company page, view the department section, and hover the mouse over the figures: