Two-captain pairings are possible, and not particularly exceptional even -- obviously, both captains are fully type rated in the aircraft, so together they make a full crew for the aircraft (barring a F/E as Dave points out).
There are two scenarios where this is common:
A pilot is being upgraded to Captain of a specific type or is otherwise undergoing training "on the line", such as differences training. He will occupy the left seat, while the instructor Captain will occupy the right seat during his line upgrade flying.
A line check is being performed. In this case, the line captain occupies the left seat, while the check captain occupies the right seat.
There is also the case where while you have a captain and a first officer, the first officer has more seniority/experience than the captain. This is common with a junior captain -- "green on green" rules prohibit pairing a junior captain with a junior first officer, so many times, a junior captain will fly with senior first officers until they get some seasoning of their own under their belt.