The three things a pile needs
Carbon (browns), nitrogen (greens), and air plus moisture. Without air it smells; without moisture it stalls; without enough nitrogen it stays cold. Turn the pile when the centre cools, and chop materials smaller to speed breakdown. Use the compost ratio calculator for a starting mix.