こと is nominalization and so far to me (a student), the most important thing to learn in Japanese.
It's how you take verbs or incomplete phrases and make them nouns.
食べること は よい です。 Eating is good
In the above example, 食べる was turned into the subject thanks to こと. With this you can make more complex thoughts.
映画を見ます- watch a movie
彼女 は 映画を見ること を ほしいです - She wants to watch a movie
Here, こと made a "sentence" into an object.
I hope this helps.