Walking on the beach, Delores dodged the jellyfish that had washed ashore. Walking on the beach = present participle phrase describing the noun Delores. Walking on the beach is painful if jellyfish have washed ashore. Walking on the beach = gerund phrase, the subject of the verb is.