At first he was a robber who is called "king of the desert ", robbing passengers in the desert. By attacking Goku and his friends, he learns about the Dragon Balls and decides to travel with them.
His reason is simple, as he is a thief who fears girls, he hopes to gather the Dragon Balls to end his shyness. He unfortunately can not have the Dragon Balls, but instead he befriends with Bulma.
After the debacle of the Red Ribbon Army, he moved to improve in martial arts by becoming, after Goku and Krillin, Master Roshi's disciple. When Vegeta comes to Earth in order to exterminate it, Yamcha was killed in the explosion of a Saïbaman that was launched against him.