In Mystery Dungeon, there are wild pokemon everywhere in the dungeons, and they can be a pain sometimes, but you can also turn them into your companions by befriending them.
Wild pokemon generally attack you once they see you, and unless you can move away quick enough from them, it's inevitable that you have to fight them. The good news is when they are asleep, they will not wake up until you are right next to them (diagonally counts too), so do all you can to avoid going near a sleeping wild pokemon unless you really want to fight it.
Wild pokemon attack just like you do. They could use the simple tackle which is not limited by type and PP, they could pull off their real attacks, or they could throw items that they have picked up.
In the later dungeons, wild pokemon will gang up on you on conditions known as the Monster House. You will know when you have entered a Monster House because wild pokemon will pop up all together and the music will change. While this increases the chance of a rare pokemon on that floor appearing, you really have to be strong enough to take down all of them. It can be a pain when you've just befriended a low levelled pokemon and the wild pokemon just keep ganging up on it.
Also present is later dungeons is the Kecleon Stall. While everything will be alright if you pay what you get from there, trouble will befall you if you choose not to pay. The Kecleon in charge will start attacking you, and worse yet, it will call upon a whole bunch of Kecleon which will start appearing everywhere on the floor. They are all pretty strong so unless you're strong or you could locate the stairs to leave quick enough, you'll most likely wind up dead. However, this is the only way to fight wild Kecleons, and thus only when you cause this massive surge of Kecleons will you be able to befriend one, though the chance of doing so is really slim.
So, how does befriending a pokemon works? (Wild4.png)Whenever you beat a wild pokemon, there will be a chance that it will join your rescue force, this chance is based on the following factors: 1) Your leading pokemon's level - your level must be higher than the wild pokemon's, but there's no way to tell what level the wild pokemon is before you befriend it, so the simple thing is just to level up yourself as much as you can
2) You rank - the higher your rank, the easier it will be to befriend a wild pokemon
3) Presence of Friend Area - with the exception of some legendaries, you must have the Friend Area of that pokemon before you can befriend it
4) Team size - the maximum number of pokemon on your team is 4, so if you already have 3 pokemon following you, you cannot befriend anyone else
5) Body size - each pokemon has a body size which you can look up on the last page of its lookup, indicated by the number of stars. Generally, most pokemon are of size 1 only, even the fully evolved starters, but ones like Onix and Lapras are about 4, so as most of the bigger legendaries. The total body size you can have on your team is 6, so let's say your leading pokemon is an Onix (size 4), you will only be able to befriend one size 2 pokemon, or 2 size 1 pokemon, and definitely not anymore size 4 pokemon
6) The Friend Ribbon - when your leading pokemon holds this rare ribbon found on 50/F of the Far-off Mountain Top, it will increase the chance of you befriending a pokemon
7) Who beats the wild pokemon - it must be your leading pokemon who beats the wild pokemon, if it's killed by one of your team members, it will not join you
8) Luck - really, sometimes it just comes down to this, as befriending a wild pokemon is also governed by a random numerical code in the game
Not all pokemon in the dungeons can be befriended, usually fully evolved ones are not available to befriend (eg. Togetic, Azumarill). Intermediate ones (eg. Kadabra, Haunter) may join you, but are relatively more difficult to befriend. Known exceptions to the no-fully-evolved pokemon rule include Golem and Octillery, while for some reason, the fully evolved water starters are able to befriend as well at the Western Cave but not the fire or grass ones. We may discover more along the way.
After you befriend a wild pokemon, you must keep it alive until you completed the dungeon, otherwise it will just be considered lost. If you managed to keep it alive, it will go to its Friend Area when you leave the dungeon.

There are currently 12 version exclusive pokemon:
Red only - Plusle, Roselia, Porygon, Feebas, (Milotic), Mantine
Blue only - Minun, Aipom, Porygon2, Magikarp, (Gyarados), Lapras

Technically Porygon2 isn't a version exclusive since the item Upgrade is found at some Kecleon Stalls in the Wish Cave, but the others are unavailable in the wild for those specific versions.

Since trading is not really possible in Mystery Dungeons, there is a special way to deal with this. Look at each of your mission request forms, you will notice a code at the very end of it, and on each version, at times certain missions will involve the version exclusive pokemon. What you need to do is to type this code at the Mystery Gift option at the start-up menu on the other version, and after completing the mission, that particular pokemon will start appearing in the wild.

For example, Lapras it not available in Red. Someone who plays Blue comes across a notice board mission which involves a Lapras, and writes down the code. He then gives the code to his friend who plays Red, and this friend inserts this code at the start-up menu's Mystery Gift option. He will now be able to go on this mission. If he happens to complete it, Lapras will start appearing in the wild in his game.