Apple's implementation of @synchronized is open source and it can be found here. Mike ash wrote two really interesting post about this subject:
In a nutshell it has a table that maps object pointers (using their memory addresses as keys) to pthread_mutex_t
locks, which are locked and unlocked as needed.