You have clay soil thats also filled with rocks which sort of leaves you with 2 options.
1) dig down untill you find no more rocks/stones and then backfill with the same soil by first sifting it using a soil screen or replace it all together with new soil and then amend the soil using compost. I had worked on a similar project and the dept i had to go down to was 2 feet. Digging was tremendously hard because the showel kept on hitting rocks everytime i tried to push through and required removal by hand but once done, you'll get that well drained soil that every gardener desires.
2) create raised beds using soil that is well drained and rock free.