How to check if object has a certain tag when used

I am trying to make it so if the player presses E and the game object has the tag useable it will do something. In this case it just prints “You just used something” problem is the code I am currently using just checks to see if the the object with the script on it has the tag. How would I make it so it checks to see if the object that was used has the tag Useable? This is my current code

if (Input.GetKey ("e") && gameObject.tag =="Useable") print ("You just used something");

I’m guessing you need to check what the player clicked on, get that object’s tag and see if it is Useable.

Something along these line:

if (Input.GetKey ("e"))
{
   var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
   if (Physics.Raycast(ray, hit) && (hit.transform.gameObject.tag =="Useable")) 
   {
       print ("You just used something");
   }
}

More info here.