In order to understand Kant, first read David Hume's Essay Concerning Human Understanding. Kant's major ideas are entirely a response to this essay (we English-speakers are lucky to have this crucial piece of the Enlightenment in our native tongue). Hume argues that cause and effect are entirely empirical concepts, which has the implication that we can't actually talk about "eternal laws of nature" with any sense. Kant wrote The Critique of Pure Reason and his subsequent critiques in the trilogy to argue that the laws of nature are laws because they are the laws of our ability to experience subjectivity at all. The Critique is very dense and technically written and the English translations do little to abate this. I would recommend reading it with a companion commentary text though unfortunately that wasn't the path I'd taken so I can't pick out a specific one.
Not the user you replied to, but there's no harm (and in my judgement great benefit) from diving right into Kant, or more generally, German idealism - so Kant, Fichte, Schelling and Hegel. Marx is also worth visiting for his "Hegelian" materialism (in this case opposed to idealism). That'll provide the basics to know what Foucault was talking about.
The Cambridge Companion to German Idealism (I forget which year) is also highly recommended though I haven't looked into that myself.
Also, to plug my own favorite dead German guy, Schopenhauer spends a lot of time in his writings explaining (his interpretation of) Kant's ideas, and his prose is much easier to understand than Kant's, even in translation. You won't get any love for Fichte, Schelling, and Hegel from him though.
It should be noted that even Kant said that Hume "awoke me [kant] from my dogmatic slumber." Hume is pivotal to Kant's work, so at least reading the Enquiry is a good thing to read before Kant.
While true, and I realize the irony of saying this since I mentioned building up to Foucault, I don't think one is harmed so much by simply starting. There's a lot of people who try to pile on more and more prerequisites and I think it's less productive; for every person who tells you to read Hume before Kant there are ten who will tell you to read Berkely before Hume. Personally I simply entered what interested me; first Marx (which is an ongoing love) then Hegel and now Kant. Heraclitus can come later.