You can play with Genshin Impact solo or with your friends. Best of all, the game supports cross play no matter what platform you are playing on. To add friends, you will need to know their UID or User ID. You can find your UID in the lower right corner of the screen. This will be a 9-digit number that you will need to give to anyone who wants to add you to their friends list. You will also need it to add other people to your list.
The interesting thing about multiplayer is that it isn't available right away. Instead, you need to play through the game's intro area, an effective tutorial that will introduce you to the mechanics and world of the game within hours of playing. You will need to reach Adventure Rank 16 before the game starts. The game's multiplayer does not become available.
Once you've reached Adventurer Rank 16, a small star will appear as a new icon next to your minimap. A mobile, you can just click this star to open the multiplayer menu, or you can press the F2 key on PC. Pressing the options button on PS4 will allow you to choose the Multiplayer menu from the list of options.
You can either send invitations to your game to people on your friends list, or join other players' games if you wish. You can also search for players by UID even if they are not on your friends list.
Up to four people can play together in multiplayer mode, but all of them will need to be at least Adventurer Rank 16 in order to join the game. Keep in mind that you can do a lot of things in multiplayer mode, but you cannot play the main quests. We're assuming this is a simple balancing act, as the quests weren't designed with four players in mind. However, you can manage dungeons, explore the world, find treasures, and take on all kinds of monsters in the game's vast open world.