When I was an undergraduate, I got interested in computational algorithms, but couldn't let go of my long-time fascination with natural systems. I pasted the two together and started my first research project writing a simulator for viral capsid assembly.
I learned some skills (like computer programming and statistical inference) in courses as an undergraduate and graduate student. I've gained most of my skills during research by talking with colleagues, consulting the literature, and trial-and-error.