Foster care is just what you said - you would take care of the doggy until such time as he can/is adopted permanently by another person. Some rescues don't have an on-site shelter so all their animals go into foster, prior to being put up for adoption.
If a dog is up for foster but not adoption, it might have developed kennel cough, or need some additional training before being suitable for adoption. Some dogs also just do not take well to a kennel environment. Depending on the rescue/shelter and the dog's condition, this could be for a few weeks or a few months. It's also not totally uncommon for a foster parent(s) to grow so attached to the dog that they decide to adopt him permanently. You can just specify to the rescue that you want to adopt, not foster.
I occasionally foster cats from a shelter and even though I know I couldn't adopt them, it's tough to return them when they're well again.