For the optimum compost pile, you want it to be at least three feet wide and high. Ideally, you want to lightly layer dry browns (crispy leaves), greens (fresh cut grass, weeds, leaves, veggie trimmings, etc) and if possible a sprinkling of existing compost to get the bacteria going. Then water.
A good compost pile will be equal parts browns, greens, water and oxygen.
Technically, you "can" compost fruit and meat etc but this is best if you're on a farm away from civilization so you avoid complaints of odor. If you avoid fruit and meat, then your compost pile should not smell and you shouldn't have any problem with your neighbors, critters, or flies.
One spring I had 11 large trash bags full of oak leaves from the previous fall that were dry, bags of fresh grass clippings, and a bit of compost. I lightly layered each and within 2-3 days it was cooking at 165 degrees. I even successfully broke down gumball seeds. I was quite impressed. I'd read a lot about it so it was cool to witness the phenomena in person. It's truly amazing how little is left after the process is done.
Good luck!