You have several options to play co-op in Nioh. Unfortunately co-op with friends is rather restriced. To say it right away: It is NOT possible to play through the whole game mission by mission with a friend as at least one player needs to have beaten a mission in order to be able to join.
Now for the details.
1) Basics
In order to play co-op and summon a companion into your game you need to offer an Ochoko cup. These can bet gotten from dead revenants (the red ghosts from dead players that you can summon/that are summoned via red graves)
You can offer these cups at the shrine menu under the "summon" section.
The game will then start looking for a companion and connect them to you as soon as it finds one.
2) Joining Co-op with randoms:
1. After you beat a mission it is unlocked for proper co-op. You can then
- Highlight the mission on the map, hit X and then it allows you to hit Square to 'Become a Visitor.' In this mode when the host dies you are sent back to your world and you can't be revived either by the host
2. You can use the 'Starting Point' menu. There is an option called 'Torii Gate.' You have two options here:
-Yokai Realm with a Companion: This modes lets you revive each other with a gauge going down if someone dies till you survive the dead player. Just hit Circle at their grave. When the gauge is emptied the mission fails for both players.
-Random encounter: This is similar to 1. You don't get to revive each other in this mode.
Both options let you either randomly search for a game or specify a mission. You can only choose and enter certain missions with these menu options IF YOU HAVE ALREADY BEATEN THEM.
3) Co-op with friends/people using a password:
This is where it gets a bit annoying. The game offers a password system to connect with friends or people using the same password. This seems similar to Dark Souls and Bloodborne... But only at first glance.
You have the same options as stated above but are restricted to only being able to search for and enter missions that you have already beaten. So if two friends haven't beaten Mission 2, yet they won't be able to co-op it together.
So in order to play co-op both players need to
1. Set the same password
2. Set the password to 'On' obviously
3. The player trying to help/trying to join the other players as a companion has to have the mission unlocked/beaten
4. You then have the same options described above.
-via map 'Become a Visitor' option without revives
-via Torri Gate 'Random Encounter' without revives
-via Torri Gate 'Yokai Realm Companion' with the ability to revive each other.
The requirement of at least one playing having a mission beaten to be able to join has been criticized by several people and magazines already. Considering that the developers have already listened to feedback a lot this could very well be addressed in a patch but for now it is a bit annoying.