Already a discussion was been done regarding this. Please search question if it is already available before you ask. Thanks.
Pls refer the following links:
iPhone SDK: MapKit multiple custom annotations
Multiple Arrays of Annotations, Different Pin Color for Each Array?
Do this in viewForAnnotation:
int annType = ((YourAnnotationClass *)annotation).annotationType;
switch (annType)
{
case 0 : //Food
pinview.pinColor = MKPinAnnotationColorRed;
case 1 : //Gas
pinview.pinColor = MKPinAnnotationColorGreen;
default : //default or Shopping
pinview.pinColor = MKPinAnnotationColorPurple;
}