The terms can sometimes vary from game to game. For the most part, my understanding of those terms is from my experience playing world of warcraft and runescape - and there’s still some differences between the terminology they use in both of those games.
A Party is a loosely formed group of players that can be created at any time when one player invites at least one other player to the party. Parties can easily be created, joined, and disbanded at any time. Once you are in a party, the party leader can usually start a match or join the queue for matchmaking, as to ensure that you all get into the same match on the same team.
What you are describing here sounds like it would be best described as a party of friends that are playing in a private match:
A Clan is typically a larger, more official organization of players in a multiplayer game, often times with internal ranking systems and leadership hierarchies, and most multiplayer games will allow any player to found their own clan. Sometimes games will use the terms “guild” instead of “clan”. Clan members are also typically put into a chat channel together while they’re logged into the game so that the members can chat and form parties together to achieve other stuff in the game.
And for most games, the Team is which side you are on in a multiplayer match. Most genres of games let you switch teams at the start of every new match, and it is also the job of the matchmaking system to assign balanced teams when the players are joining a match for game modes where its relevant.
But for MMORPG style game, its common to use the term “Faction” instead of “team”, and the player is often forced to choose between 2 or more developer-created factions when they make their character, and then players are often restricted to only joining parties and clans with players of the same faction, and will inevitably end up PvPing with players of the other faction in the open world.
Its also common for PvP server-based games (like Rust or Minecraft Factions Servers) to determine the teams based on your clan or guild, and players can join clans as freely as they can join a party. So in these games, they are kind of blending the clan, party, and team system all into one. Its not uncommon for players to take advantage of these systems to join a clan for the purpose of betrayal or personal gain, and these games usually encourage that as part of the fun.
Hopefully I’ve given a decent, general description of these terms, but let me know if anything I said could be explained better or doesn’t make sense