Assuming that it is a vacuum actuated petcock it will have 2 smaller diameter hoses hooked up to the back of it and a larger diameter fuel hose that goes between the petcock and the carbs (if the previous owner installed an inline fuel filter you should change it and if they didn't you should install one). The small hose closest to the front of the bike is the vacuum hose. It needs to be hooked up to the vac nipple on the right carb. The other small hose is just a vent hose, and should just run down in front of the rear wheel with the other drain/vent hoses.
So, to eventually answer your question, when the bike isn't running no fuel should flow and when the motor is cranking a steady stream of fuel should flow. If it flows when it shouldn't you're probably going to want to take the petcock apart and have a look at it. If it is sputtering when the motor is running you'll want to check the condition of the vac hose too. It'll probably at the very least be fitting loosely, if not actually split. Either way you won't be getting good vacuum. This would also explain your sudden lean situation. What colour are the plugs? The carbs are actually pretty reasonable to disassemble and clean, especially with the good advice (there's a book too) available on this forum. They're a little harder to get 'right' but it's worth it.
I don't like this style of petcock and a lot of people here don't either. The fix that Lucky described is one that has worked for many, although I encountered the odd problem that with the two ports joined with a short length of hose, when the bike warmed up, the air in the bypass tube seemed to expand enough to force the diaphragm closed in the other direction. At least, that's the guess I came to when the gas repeatedly shut off shortly after the bike got hot. I think my fix was to keep the vent line in place and use a blocked-up short piece of vac hose to block off the vac port on the petcock. Actually you'd need another of these plugs to block off the port on the right carb too. Since then I haven't had any problems except for when it puked out about a cup of gas onto the freshly surfaced parking lot at the Tim Hortons in Sault St Marie. But that was a stuck float and it hasn't happened since.
If it's a regular petcock valve then nevermind.
Actually, you can clean it and install an inline filter. You should probably get the carbs apart and cleaned too but at least you can see if this makes a difference.
And there's lots of help on this forum for the asking.