A gerund, which is a verb form ending in "-ing", can function as the subject of a sentence. Two example sentences are provided where the first uses a gerund as the subject and the second rephrases it using "it is" plus an infinitive verb, maintaining the same meaning. Riding horses is fun and it is fun to ride horses both convey that horseback riding is enjoyable.