Just to support what John has said, a gerund is a verb that is 'doing the job' of a noun. Gerunds are formed by adding 'ing' to the base for of the verb.
We mainly use gerunds in three situations. Using John's examples:
1) As the subject of a sentence ---> Flying is fun
2) Following certain verbs ----> I enjoy drinking beer
3) After prepositions ----> Advice about smoking
Basically, if you need to use a verb in a situation where you could also use a noun, the verb should be in the gerund form. For example, you could put nouns in all of those sentences above : 'Tennis is fun' and so on.
By the way, don't confuse the gerund with the present participle. In a sentence such as 'I am speaking', the word 'speaking' is a present participle, not a gerund. In modern English, the form of the gerund and the present participle is the same, but grammatically they have different functions.