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?
ｘ 私｛わたし｝は芋｛いも｝が彼｛かれ｝を殺｛ころ｝すこと思｛おも｝います。 (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.