You can't go into Demon's Souls expecting a typical co-op or multiplayer experience with its online functions. It's still strictly a single-player oriented game. The point is not to team up with people in your friend list and go kill things, it's to further develop the world and build ambience. There are aspects of it which are purely atmosphere-enhancing in nature (ghostly silhouettes of other players exploring the world at the moment) and others which do that and provide possible aid to the player, such as the messages/hints people can leave anywhere in the game or bloodstains that let you privy to a deceased explorer's final moments, thus warning of impending danger in the vicinity.
The direct interactions with other players, in the form of blue and black phantoms, are similarly another twist on the usual multiplayer components. Players in soul form can offer their aid as blue phantoms, with the eventual goal and reward of regaining their body form. It's entirely up to oneself if you wish to rely on blue phantoms (I haven't done so), but in a game so often maligned for mercilessness, it's certainly a viable option for those who choose to indulge in it. It's a temporary alliance between strangers, with both parties benefitting off each other, in line with the overall solitary nature of the game.
Black phantoms are probably more interesting, and more important in the grand scheme of things. While players in body form are granted full use of their HP potential, it also leaves them as targets for black phantom invasions. It's the same principle as with blue phantoms -- resurrection being the goal of the invading party -- but black phantoms hunt you instead of lending assistance. Despite the host technically having an advantage from the outset with a greater HP pool, it's an undescribable thrill having your game invaded, and an even more pronounced sense of triumph if you manage to fend off the attacker. The only gripe I can think of is the amount of lag present in most encounters.
None of the online features in Demon's Souls are instrumental to the game. You can resurrect yourself in other ways, and the manipulation of character and world tendency (a somewhat complex and obscure sub-system) can be achieved without going online, as well. Nonetheless, they serve as evidence of the developers' understanding of their product and how to best complement it, to a degree that much of the game's identity is defined by these technically secondary design choices.