eg The students sang a song written by the Carpenters in class today.
We would understand from the context that in class today refers to 'the students sang', not where the Carpenters wrote this song.
So in many cases its understandable what is meant. But sometimes it isn't and this is one reason why syntax is important.
eg He told me on Friday afternoon he will go shopping. ie. he will go shopping on Friday or he told me on Friday?
Yes, young native speakers do make this kind of error - like many people they want to get their point across and not worry so much how it's done!
Perhaps an academic can come up with some other examples - this is the one I usually think of in terms of confusing contexts.