I've got a toddler, and it seems like differences in self-confidence (at least as manifested in exploration and being ok with separation from a parent) kicked in almost immediately. So it may be nurture in the initial months, or there may be a reasonably large genetic component. That said, even if we've got natural inclinations, it's very clear to me that upbringing (and our paths through life) can have a big impact.
We try to push our son to try things on his own (getting dressed, keep trying with a toy that's frustrating him). We praise his successes and encourage him during failures. Show him love. Trying to train him that overall things are ok, and that when he faces adversity there's support he can find in family and in himself.
I also try to keep an open mind to the variety of ways there are to deal with issues and succeed in life. Low self-esteem can manifest in surrender, but I've also seen it manifest in a drive to out work everyone else. Just one of those oddities about the complexity of life: sometimes the most successful people are driven by some deep neurosis. We often praise daring risk takers, but the overly cautious can also win in the end. Lots of paths through life. As a parent you try to guide them where it seems like things will be easiest/happiest, but I also try to step back and acknowledge that he'll be his own person, and that the straightest path isn't necessarily the best.
Along those lines, I found the variety of tactics people took to dealing with bullies and social hierarchies interesting. Using humor or kindness to diffuse situations. Befriending a bigger, tougher kid. I figured out early on that indifference was shockingly effective against a bully. They'd pick on me and I wouldn't give them a rise. They'd ask if I wanted to fight, and I'd shrug that I didn't particularly, but would. Every time they'd back off and leave me alone for good. I was merely nerdy but otherwise not terribly different from the crowd, so I don't know if it'd work in more severe cases. But it turned out that just going off the script of "either I back down and you pick on me, or I act aggressively back and maybe we fight" just ended the whole thing.