Based on my all-time favorite western novel by Jack Schaefer!!
From Wiki:
A mysterious gunslinger named Shane (Alan Ladd) drifts into a quiet western town, and quickly finds himself drawn into a conflict between simple homesteader (sodbuster) Joe Starrett (Van Heflin) and powerful cattle baron Rufus Ryker (Emile Meyer), who wants to force him and every other homesteader in the valley off his land. Shane accepts a job as a farmhand, but finds Starrett's young son Joey (Brandon DeWilde) drawn to him for his strength and skill with a gun. Shane himself is uncomfortably drawn to Starrett's wholesomely charming wife, Marian (Jean Arthur).
As tensions mount between the factions, Ryker hires Jack Wilson (Jack Palance), a cold-blooded and skilled gunslinger. After Wilson cold-bloodedly murders another homesteader (played by Elisha Cook, Jr.) who stands up to him, Joe Starrett decides to take it on himself to go kill Wilson and Ryker and save the town; however, he is stopped by Shane who insists on going himself. Starrett and Shane get in a fist fight where the winner will go on to face Wilson and Shane regretfully uses his gun to hit Joe over the head and knock him out, knowing this was the only way to prevent Joe from getting killed. Shane then goes to take on Wilson in a climactic showdown, killing him and Ryker, but being wounded in the shootout. After urging young Joey to grow up strong and take care of both of his parents, Shane leaves for parts unknown.
When Shane rides away, Joey calls after him, "Pa's got things for you to do! And Mother wants you. I know she does." The movie closes with Joey shouting "Shane! Shane! Come back!"
Due to the ambiguous nature of the final shot, there is some question as to whether or not Shane actually survives his wound, especially as he is last seen riding off in the direction of the local cemetery, a possible symbolic intimation of his death or in a more general sense the symbolic death of the gunfighter in western life.