This question is kind generic, but basically what you should do to accomplish that task is:
1 - Define your dataset, i.e. the folder that contains all images that you will use. Presuming that you will use supervised learning classification, this dataset should contain a considerable number of examples for your machine learning algorithm, i.e. pictures already classified with the information you are looking for.
2 - Extract the features that you will use in classification from the image. You should decide at this moment which approach you will use to distinguish the subjects, it can be by the clothes for example, if in your input the person is wearing a uniform, you can use this information to distinguish that person.
3 - Normalize the rest of the data: after you decided which information you will use for step 2, you should now "standardize" the rest of the information so the irrelevant features in the image will not be consider (for instance, the image size / scale is not important in this definition, so you must put all the images in the same size / scale).
4 - Choose and implement a Machine Learning algorithm to classify the real time data (webcam as you said) based on the dataset examples defined in step 1. There are a vast number of algorithms to choose (a big number of those was already implemented in the OpenCV lib), like: Random Forest, Support Vector Machine (SVM), Neural Networks. You can read more about this here: http://docs.opencv.org/modules/ml/doc....
Hope it can be useful.
you have the entire man or just a part of it in the frame?