They end up in the same sentence constantly, and I am as guilty as anyone: yoga, Pilates and dance. It is a fair description of my timetable and a poor description of what the two things actually do.
Different origins entirely
Yoga is a practice thousands of years old with philosophical roots, of which the physical postures are one part.
Pilates was devised in the twentieth century by one man, largely as rehabilitation, and is a system of controlled exercises with no philosophy attached to it at all.
What that means in a class
Pilates is repetition. Small, precise, controlled movements, repeated, working the muscles through the middle of the body. You will count. It is much harder than it looks from the doorway and it does not look like much from the doorway.
Yoga holds shapes. Depending on which class, it holds them for a long time. Breath is part of the instruction rather than something you do on the side, and in some of the classes here so are chanting and music.
Which to choose
If you want core strength, control and a rehabilitation lineage, start with Pilates.
If you want flexibility, breath and something with more in it than exercise, start with yoga, and then pick which yoga, because the five on this timetable are not interchangeable either.
If you want both, they complement each other well and plenty of my people do exactly that. Nothing here is tied to one discipline, so alternating costs you nothing extra.