Context Menus are a way to run an application command without typing anything. They are accessed in the "Apps" section when right clicking a user or message.
When you right click a message, they are called message commands. In discord.py 2.0 you can implement them as such:
@tree.context_menu(name='Translate with Google', guild=discord.Object(id=MY_GUILD_ID))
async def translate(interaction: discord.Interaction, message: discord.Message):
...
Likewise when you right click a user or member, they are called user commands. You can change the annotation from discord.Message to discord.Member accordingly:
@tree.context_menu(name='Ban User', guild=discord.Object(id=MY_GUILD_ID))
async def ban_user(interaction: discord.Interaction, member: discord.Member):
...
You can also annotate this with discord.User, but because context menus are only applicable in guilds, they'll probably always be members.
Documentation: https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.app_commands.CommandTree.context_menu
Note: Context menus cannot be used inside of cogs (in the way you'd normally expect) - see the issue here: https://github.com/Rapptz/discord.py/issues/7823#issuecomment-1086830458