Verb nominalizer
Turns a verb into a noun phrase, like adding "-ing" or "to" in English, to talk about an action as a thing, event, or fact.
こと changes a verb into a noun, allowing it to be used as a subject, object, or after certain particles. For example, "たべること" means "eating" or "to eat" as a concept. You can say "たべることがすきです" (I like eating) or "くるまをうんてんすることはむずかしいです" (Driving a car is difficult).
Note that こと is often used to talk about abstract actions or facts, while の is used for more immediate or concrete situations. For instance, in "たべるのをわすれた" (I forgot to eat), の sounds more natural because it's a specific instance. But for general statements like "はなすことはだいじです" (Speaking is important), こと is preferred.
The word こと also appears in the expression ことがある meaning "sometimes do" or "have done before," and in こと(が)ある as a different grammar point meaning "must do" (with なければ). This entry only covers the nominalizer, not those other uses.