“I sometimes want to know how farming .” - This sentence indicates that you want to know how farming ORIGINALLY started, as in a historical perspective.
"I sometimes want to know how farming - This sentence indicates that you want to know how farming generally starts, as in the process of becoming a farmer today.
It looks like you want to use the first sentence, although I can't be sure without more context.