Thanks for your question. Most guys have had an erection at an awkward time. This is normal, and can happen even when you are not thinking about anything sexual.
Here are some things you can try:
- Discretely readjust your pants or shorts
- Find something to hide the erection, such as a towel or your hands
- Think about something else (we know this can be easier said than done)
- Go to the bathroom or other private space to readjust