Depending on the food, it takes anywhere from 20 minutes to several hours to be broken down into a form usable by the body. It only "turns to fat" if you are eating more calories than you burn.
it really depends on how much else you've eaten, how fast the food is broken down, etc. What happens with such things as carbs, is that its changed to glucose, and stored in your liver and muscles. Once those stores are full, its changed to fat.