When you become a mercenary for a faction, you don't get a fief, but you do get paid. If you visit the faction leader every week he will hand over your money.
If you miss one week he saves up the money to give you.
As a merc for a faction, you can ask the king to become a Vassal. If you have distinguished yourself enough, the King will agree, and, after you take an oath, you get a small fief, but you no longer get paid. You are expected to maintain troops from the income from your fief.
I'm told that after three months of a merc. contract, the contract ends and you can either go off or renew the contract, but I'm yet to do that.
As a vassal, you can ask to be released at any stage. I assume you lose your holdings, but I haven't done this myself.