Express an action in a nominal (noun-like) form or state fact or experience.
Long explanation:
The ~こと grammar point is used to turn a verb or verb phrase into a noun or noun phrase. This allows the verb to be talked about as a general concept, fact, or experience. The formation varies slightly depending on whether it is used with a verb or a verb phrase.