How does online crossplay work?

A friend told me that borderlands 3 was crossplay (ps4 and PC) and he is telling me to get it. Neither he or me have any idea of the game, I only have played Borderlands 2 on Xbox 360.

I wanted to know if we can play the campaign together or it only have a sort of pvp.

Thanks!