I’m not sure if VV can do this or this may be a video camera function. Anyway, I have a video with a foreground and a background object. How do I switch the focus from one object to another and while I do that, I also want the out-of-focus object to get blurred.
VV can't do this, it is a function of the camera. It relies on "depth of field" which is a function of the lens and the size of the imaging chip(s) in the camera. DV camcorders don't do depth of field tricks nearly as easily as you can when shooting 35mm film, since the chips in a camera are a LOT smaller than 35mm film. It's the laws of optical physics.
To get a camcorder to do it at all, you must have the aperture wide open which may involve the use of neutral density filters to cut down on the amount of light entering the lens so you can open the aperture as far as possible.
I have faked it on occasion by compositing two objects and a background on three tracks of the timeline in Vegas or After Effects and playing with blur and keyframes. But as far as taking an existing shot on a single track on the timeline and "racking the focus", that is not easily accomplished.
This is far easier done in the camera while taping.
If you need to do it while editing, you'll have to have both objects sharply in focus to begin with. You can then mask one object and add gaussian blur to make it look out of focus. Using keyframes you can then reduce the blur on this object while increasing it on the other to have the focus shift from one to the other.
If either of the objects is out of focus in your existing footage then you're stuck. There's nothing you can do while editing to sharpen focus.
If both are in focus originally, I suppose you could create masks and make the one seem blurred before you gradually "change focus" to it and blur the other one. But if one is blurred already, there is little you can do towards making it sharp.
Tor
You can simulate this with bezier masks but basically this is something that you accomplish with your camera. To be able to trully controll this process you need a manual focus lens, and of course the bigger your CCD, the more depth of focus control you have. Do a search on "depth of focus" and you should get a lot of results. There are many tricks available for those of us not blessed with 35mm film cameras so don't give up. A good resource for this would the P+S Technic forum on dvinfo.net, where this topic is beaten to death on pretty much daily basis.