Simple coroutine explanation

As the title states I just need a simple explanation. I understand the logic behind coroutines i just have no idea on how to implement it. I have a freeze tower (for TD game) that when it attacks an enemy the enemy freezes. In what part of the script would i need to add the coroutine? Also, do i need to add a triggered event script to access the coroutine? I have very little knowledge on how to script. Most of what i know has been through the use of tutoriols and forums. Any help would be greatly appreciated.

Thanks.

Below is my actual script

var myCashValue: int = 50;

var speedRange : Vector2 = Vector2(7.0, 10.0);
var heightRange : Vector2 = Vector2(7.0, 10.0);
var walk : AnimationClip;
var death : AnimationClip;
var health : float = 100;
var explosionEffect : GameObject;

private var forwardSpeed : float = 100;
private var maxHealth : float = 10.0;

var levelMaster : LevelMaster;

function Start ()
{

levelMaster = GameObject.FindWithTag(“LevelMaster”).GetComponent(LevelMaster);

maxHealth = health;
animation.Play(“walk”);
forwardSpeed = Random.Range(speedRange.x, speedRange.y);
transform.position.y = Random.Range(heightRange.x, heightRange.y);

forwardSpeed*= levelMaster.difficultyMultiplier;
health*= levelMaster.difficultyMultiplier;
maxHealth*= levelMaster.difficultyMultiplier;
}

function Update () {
transform.Translate(Vector3.forward * (forwardSpeed * Time.deltaTime));
}

function TakeDamage(damageAmount : float)
{
health -= damageAmount;
var helathPercent = health/maxHealth;
if(health <= 0)
{
Explode();
return;
}
}

function Explode()
{

animation.Play(“death”);
yield WaitForSeconds(animation[“death”].length);

levelMaster.cashCount+=myCashValue;
levelMaster.enemyCount–;
levelMaster.scoreCount+=(maxHealth+forwardSpeed*levelMaster.difficultyMultiplier);
levelMaster.UpdateGUI();

Instantiate(explosionEffect, transform.position, Quaternion.identity);
Destroy(gameObject);

}

First of all, always use code tags when posting code. You already have a coroutine, it’s your function explode. Any time you are using yield WaitForSeconds, you are using a coroutine. Freeze wouldn’t be very different would it? You would wait longer after the animation or after you stopped the animation. My explanation of a coroutine is a function that lasts longer than one frame by using yield WaitForSeconds. You could check the script reference for a more elaborate one.