Accessing a game object from a script?

Suppose I have an enemy prefab and several isntances of this prefab exist throughout the game world. Now I want to write a script which gets the position of all the enemy prefab instances and does something to them when the player presses the space key (like change their position, damage their health, stuff like that).

How do I go about doing this?

You can use a common tag for all enemies, and get them in an array with FindGameObjectsWithTag:

    // Find all game objects with tag Enemy
    var gos : GameObject[];
    gos = GameObject.FindGameObjectsWithTag("Enemy"); 
    // Iterate through them and do whatever you want
    for (var go: GameObject in gos){
        go.transform.position.y += 2; // make all enemies jump 2m!
    }