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 sablee, 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!
Pie recipes can also vary in size, going from tarts to tartlets and anything inbetween.
Or they can have the pastry layered, inverted and even on top of the filling, the main ingredient. The latter can be found as crumbles or cobblers.