2.1 Focus fully on the speaker
One way to combat our tendency to drift to other thoughts is to mentally repeat to yourself what the speaker has just said. Another way is to make notes. The physical act of writing will keep you focused, even if you never need to refer to the notes after the event.
If there are just too many distractions, tell the speaker at the earliest opportunity and suggest you move to a different place or delay the conversation until it is quieter.
Finally, make sure that you are not the cause of the distraction. Playing with your pen, or looking at your watch or your phone, is distracting for the speaker.