A small child is riding in a red wagon.
A kid is in a wagon.
The small child rides in a wagon that is red.
Riding in a red wagon is the same as being in a wagon.
A small child is a kid who is riding or in a (red) wagon.