Is there any rule for an English word to change into a noun, verb, adjective or adverb

Is there any rule for an English word to change into a noun, verb, adjective or adverb

For example, dance dancing stresses the closed syllable, writes the last consonant letter, and then adds ing. For example, swim -- swimming. 2. Adjectives change into adverbs, usually directly + ly, such as bea