How to detect if a specific node has a certain tag?

I’m new to Drupal and PHP and so basically I have a test module that consists of an email/link and I want to make a module or add to the current one a function that runs and stops a user from continuing if there is no ” tag or corresponding href tag as well. How would I go about starting on this? I’ve read up on hooks and modules but I’m unsure of how they all work together?