The theory of multiplayer in panda3d

I have been doing a bit of googling to find this answer but haven’t had much luck…

basically I am trying to understand multi-player concepts with panda3d.
but I haven’t been able to find any resources on this.

exercise:
I want to have a red cube and a blue cube on screen.
when I launch the game I control red cube.
When my friend launches the game on their pc they control blue cube.
When I move red cube on my screen my friend sees red cube move on his screen

if anyone would be kind enough to give me some insight into this I would really appreciate it.