How do you find the tag of the object that is a trigger?

So, I’m new to unity, so I don’t know if this is possible, but:
How do you check the tag of the object that is in a trigger? Any way to do this would work.

For example, I have a two player game with a selection screen that uses two cursors to choose, and I want the buttons to be able to discern the tag (Player1 and Player2) so that my game knows which character is chosen by which player. On a side note, the cursors are rigidbodies, and the “button” is a trigger. This is because it is local multiplayer, meant to be played on a single keyboard.

You don’t need to use the tags there.

Once a Player has clicked the Player1 button, you need to assign to him that you are the Player1.

For example you can use int playerID (0 - not selected, 1 - Player1, 2 - Player2) at each Player.

Once the Player clicks the Player1 button, we need to ask another Player “what is your playerID?”. If ID is not equal to the selected button, we can assign it to the Player like playerID = 1;