You have to write a script (a list of instructions) for it to follow, and to do that you need to know programming fundamentals.
If you go to the computer craft's wiki page, they have tutorials that show you programming fundamentals, and how to program a farming turtle.
http://computercraft.info/wiki/Main_Page