How can i add force to the first person and move it backward when it hits something?

i wanted to make the first person move backward when it hits a certain object. How can i do that?

One method would be to apply a controled Explosive Force to the player, at the point of collision or from the other object's center, for example. You could alternatively script the player to move away at a more controlled rate, whether it is directly away from the game object, or away relative to their positions and movements.

Booth objects need colliders (and one of them must not be static, probably the player), The OnCollisionEnter() function will be called when they smack into each other. In this function you can place code determining the reaction to the collision. You can use it to get collision data also, so you can use the point(s) of contact.

If you're using the default character controller, you'll need to use OnControllerColliderHit() instead of OncollisionEnter, and you won't be able to use physics. However you can use relative translation in your script to move the player away from the collider.

There's probably a much more efficient way of doing this, but here's a javascript I threw together and tested with a cube character controller and a sphere object with static collider (Bear in mind this script is almost entirely based on my lack of education with vector math):

var forceVector : Transform; // This will be our direction of repel
var forceDuration: float = 1; // how long will the repel go on
var forceStrength : float = 20; // how quickly are they repelled?

private var otherObject : Transform; // the object we hit
private var durationTracker : float; // an adjustable variable to track duration.

function Start(){

    durationTracker = forceDuration;

}
function OnControllerColliderHit(hit : ControllerColliderHit){

    if (hit.transform.CompareTag("Bounce")) //Tag the repelling objects with "bounce"
        otherObject = hit.transform;

    //alternatively you can check their name, or layer, or some value in their components. 
    //This is to prevent our player from "bouncing" off the floor they're colliding with. 

}

function LateUpdate(){
    //if we have an object we're dealing with and duration isn't over...
    if (otherObject){ 
        if (durationTracker > 0){ 

    //We take our dummy vector object, and make it the same Y position 
    //as our other Object, to make sure Z axis is parallel to the floor.
            forceVector.position.y = otherObject.position.y;
    //Then we have the dummy point at the other object, and we use that
    //as a reference for moving our player.
            forceVector.LookAt(otherObject);
            transform.Translate(
                          Vector3.forward * (-forceStrength*Time.deltaTime),
                          forceVector.transform);

            durationTracker-= Time.deltaTime*20;    
        }
        else{ // once the duration is done, reset our variables.
            durationTracker = forceDuration;
            otherObject = null;     
        }

    }

}

This will bounce your player away from a collider with some minor customizability. For it to work, you need an empty game object at your player's axis, that can be used as a dummy to point at the collider, because I made Unity do all the math work for me. I apologize if this isn't helpful, it's way past my bed time ;D