Community Friends. These are random players, that you can invite to play with you. You can add them in the 2nd tab of Friends window or by using the unique invitation code. You can only have 50 of Community Friends.
Friends from social networks supported by the game. You can connect your game to Facebook/Google Play (determined by your device type and its software). There's no limit for this friend type.