It varies from place to place. For example, people are segregated by caste in many places. In other cases, it's easy to identify from surname. But there is one method that you should be aware of - it's more relevant to silicon valley. There are a lot of cases where it's not immediately possible to distinguish caste from name or looks. People from all castes look more or less similar. In such cases, the caste believers would do covert background research. That might be from your social media profile, public and political connections or even professional service records. There are also cases where they make the determination based on subtle differences in traditions (like marriage ceremonies or celebrations, clothing styles etc). And then there are some obnoxious methods like patting someone on their back to see if they wear a 'sacred thread' under their shirt.