I just thought is there a way to displace a king, and get rid of him, so that I can take his place? I have conquered almost whole map, and I own only a few castles and cites, so I wouldn't like to leave the faction. However, I would want to do this without losing the lands I have conquered. Is there any way to do this?
There is no way to replace the king with yourself, per se. However, there are two things you can do:
1) Continue to take castles and towns and always demand them to be awarded to you. Once of these times the king will refuse. At that point, you will be given a choice to revolt. Do that and all your towns/castles/villages become your own faction and you - the king. Your former king will declare a war on you, but hopefully you are a big boy by now and can handle him :)
2) Find the claimant for your king's faction (he will say he is the true king). Offer to support his claim. You may have to do a couple of quests, I don't quite remember. But the end result is the same - you revolt against the king and your possessions become your own kingdom. The difference from #1 is that it will be much easier to recruit new lords. You will automatically have high "right to rule" rating and an option in the dialog with the lords (of that faction) to ask them to join your faction.
Sadly, there is no way in the vanilla game to do this.
I highly recommend you trying out some mods for the game, my personal favorite is "Floris Mod pack", which allows for exactly this (and a lot of other stuff, too).