What does 三人行，必有我师 mean?
There are two points that you should know:


In Chinese culture, 3 does not often  mean a exact quantity. That is, there may be 2,3,4 or many persons around you. There are many other phrases,for example, 狡兔三窟, 三思而后行,三番五次.
So this sentence means: We should keep modest to find out merit of the people around you and learn from them. There is a idiom in western culture, Stay hungry, Stay foolish, which has the same meaning.