1. You have a choice to either keep standing and listen to the Azaan and
respond and pray the tahiyattul masjid after the Azaan is over or you can pray the 2 rakahs even while the Azaan is going on. However the best option is the first.
2. As for Jumah, you should pray the 2 rakahs of tahiyattul masjid immediately upon entering even the if the athan is ongoing and even if the
imam has started the khutba.