gēn (跟) and duì (對) are both used to describe actions. They can function as co-verbs and verbs.
(1) gēn (跟) and duì (對) are interchangeable when they are used as co-verb + VP.
Sentence pattern: Subject + 跟/ 對 + Object + 說
Examples: 媽媽跟/對我說要好好學習英語 (Mom told me to learn English hard.)
However, in other cases, gēn (跟) and duì (對) convey different meanings.
(2) When they both function as verbs, they would have same sentence structure but mean something different.
跟 is a verb and the meaning of it is "follow." It is mostly used in verb phrases, such as 跟着, 跟上, 跟不上, 跟得上.
Examples: 他女朋友總是跟不上他 (His girlfriend can't keep up with him.)
When 對 functions as a verb, it means "towards" or "point to." It is used in verb phrases like: 對着, 對上, 對不上.
Examples: 答案和問題對不上 (The answers and questions cannot match up.)
別用手指對著我 (Please don't point your finger at me.)
(3) 跟 can be used as a conjunction, joining two things together. On the other hand, 對 does not have this grammatical function.
Sentence pattern: Subject 1 + 跟 + Subject 2 + Verb-Object
Examples: 小明跟莉莉都是學生 (XiaoMin and Lily are both students.)
(4) 對 encompasses the concepts of "towards" and "target," while 跟 emphasizes on conjunction and have more meaning of "with" than 對. Therefore, the sentence 我跟她玩 (I play with her.) is grammatical. But 跟 cannot be replaced by 對 in this sentence, as "play" do not need a target or do not point to certain things.