How do I check if an instantiated object collides with a specific game object?

How would I perform a check to see if an instantiated object (like a bullet) were to hit an other game object (like an enemy)?

I am new to this sorry if this question is noobie

Thanks in advance

You probably want to use tags on the objects you want the collision to interact with, and then check the tag of the object you hit, like this:

function OnCollisionEnter(other : Collision) {
    if(other.gameObject.CompareTag("Enemy"){
        //do stuff
    }
}