Determining if input is a block ID, transaction ID, or address how do sites like https://blockexplorer.com determine if the input (see inputbox in the header of https://blockexplorer.com ) is an address, transaction ID or block ID?

I want to write something similar myself on my local machine, where I run a full node and have access to bitcoind RPC. I need to know how to direct the input given one box can be 3 things.
As outlined in the pseudocode in amaclin's answer, a block explorer website would simply check to see if they can find the hash/txid/address in their database, then they will know what type of input it is.

You can't directly perform this check via one bitcoin core RPC call, you would have to write a script of some sort to perform the 3 checks to figure out which type of input you were given. You can first check for a valid block hash using the getblock RPC, and if that failed you know its not a block hash. Next you would have to have txindex enabled on your node to allow yourself to query txids using the gettransaction / getrawtransaction RPCs (because by default the node only indexs transactions which are related to your wallet). And then to check if its a valid address, you can use the validateaddress RPC call. If all of those failed, you know the input is invalid.