a way to make a simple NPC in 2d unity game

my question is this. how can I make a simple none playing character in unity. I whant it to have a certain area in witch it moves around.

Well first you need to make a character model and give it movement scripts that define speed and destination. Have it check each cycle if it's reached the destination and then pick a random destination within a range, something like this:

var dest : Vector3;
var speed = 1.0;

function Start(){
  //initialise destination
  updateDest();
}

function Update(){
  //check if reached destination then pick a new destination
  if(transform.position == dest){
    updateDest();
  }
  // movement update
}

updateDest(){
   dest = Vector3(Random.Range(-10, 10), 0, Random.Range(-10, 10));
}

to make it move around, use waypoints.