In this sentence,I think that 跟 is followed by the “object” of the verb.You can also use 从 or 向 here,but 跟 is right too .
For example,“跟你学” means “learn from you” ,“you ” is the object of “learn”.
I hope that will help you to understand.
By the way ,Chinese is very flexible,try to understand it in certain context.