It's all a combination of natural ability and training really. Breeding can come into it but the majority of decently bred working cockers have fairly similar pedigrees, particularly once you go back a few generations and most are full of FTCH dogs but relative to the numbers bred very few dogs are actually capable and well trained enough to reach this standard. A dog with trialling potential has to have a natural aptitude for working - hunting, retrieving etc. and has to enjoy it. That is the most important thing and it's something you unfortunately can never guarantee a pup will have even with the 'best' breeding in the world. Training obviously plays a big role but basically a dog either has 'it' (that natural ability) or they don't. They need to be bold, stylish and confident but also biddable, focussed, steady and controlled and they also need to be completely silent when working, even the slightest whimper in a competition and you're out. They need to be able to think for themselves but still be responsive to their handler. Amongst other things (this is off the top of my head) they have to be able to hunt quickly, thoroughly and stylishly in all kinds of cover, mark fallen game, obey commands at a distance, jump obstacles, swim, retrieve dead and live game to hand, find and retrieve running game and be able to work alongside other dogs.
When looking at pups it's always a bit of a Russian roulette as it's almost impossible to tell at 8 weeks which dogs could make it and which haven't a chance but as an overview I would look for an active pup which doesn't make any noise (whining, yipping etc. when excited are a huge no no), which has a bold and inquisitive but calm character (no fearful, timid or overly hyper tendencies), has a natural tendency to pick things up and carry them around, shows an interest in something you throw for it and shows responsiveness to humans - I usually clap my hands and/or whistle at different times and see who shows an interest in what I'm doing and I also make a loud noise and obviously a pup which shows any signs of fear or timidity would be out of the equation.