Yes, possible at all, but I bet you need the Advanced version of Unity iPhone to be able to talk sockets to your server. In general there’s always multiple ways to solve this, but one could be that you have a server acting as gameserver to which both devices, web and iPhone, talk to. Another way could be that you use the UDP packet trick, have the devices talk/register one time to the server so that they know each other and have them talk directly with each other. Most probably you’ll want to use the first method and have a game server with connected clients/devices.
How to learn that? Well, studying code, ask questions in the forums, just like you did! There’s some multiplayer examples available here on the support page if I recall right. That would be a good starting point. If you never used Unity before for any game I suggest starting with a little prototype (singleplayer) to get used to Unity because adding networking means adding extra complexity. Good luck!