Keep in mind that moving to the army of a Lord of a different faction will reset your rank in the army, so you will start as a peasant again. If you are captured during a battle and set free you are on your own and will have to find your own way back to the same Lord, or join the army of a different Lord.
You will be put into battle when your commander goes up against another Lord. You will then automatically be made a part of the Lord's army, and you'll move around the map with him. For example, talking to a lord from the Kingdom of Rhodoks makes you a Rhodok Tribesman. Being accepted gives you all the gear of the lowest rank in the faction that Lord is a vassal of.
Joining an army is done by talking to any Lord and telling him that you want to 'Join his army'.