I will preface this answer by saying there is no hard-and-fast rule, like with most particles, about when to use と and when to use こと. So, I'll try to stick directly to the context you provided.
と
The particle と is used in quite a few ways, but in this particular case (haha, get it?) it's a quoting particle.
明日{あした}も雨{あめ}です。
It will rain tomorrow, too.
明日{あした}も雨{あめ}だと言{い}いました。
[Someone] said it will rain tomorrow, too.
It works a similar way for 思{おも}う. If something is a thought of yours, say, that "apples are tasty," the phrase 「りんごがおいしい」 becomes quoted.
りんごがおいしいと思{おも}います。
I think apples are tasty.
The construct ~と思{おも}う is very common, and there's only a few circumstances in which you will see 思う without being preceded by a quoting particle (usually と).
こと
However, こと is much different. It is not a quoting particle. It literally means "thing" (an abstract thing, not a physical thing). You might see it in a few contexts, generally following verbs.
日本{にほん}に行{い}ったことがありますか。
Have you ever been to Japan? (lit. Have you ever done a thing where you went to Japan?)
泳{およ}ぐことができますよ。
I can swim! (lit. I can do swimming things!)
(There are many more situations you'd use it in, beyond these examples.)
So, why can't you use こと in your initial example?
x 私{わたし}は芋{いも}が彼{かれ}を殺{ころ}すこと思{おも}います。 (Wrong!)
This is ungrammatical and would awkwardly translate to English as something like, "I think potato to kill him." Over time, and as you get used to the usages of ~と思う, [verb]こと, and so on, you'll see which ones can be used in which situations.
Hopefully this sort of explains the difference.
Further reading