Without considering the savoury variant, pie recipes usually consist of pastry, with a wide range of fillings.
This the general view. Specifics in shape and texture may make the difference between pies and cakes less obvious.
A rule of thumb: anything made of soft and spongy batter is cake while bread like pastry as a carrier with filling would define it as a pie.
The pastry base can be shortcrust, puff pastry or filo (phyllo), with or without sugar.
It gets confusing when a cake base carries a good amount of filling like with the German Obsttorte. It looks like a pie though!