Peter Smith has a very good book list on his "Teach Yourself Logic" page. There is also a nice set of lecture notes by Stephen Simpson located here: "Foundations of Mathematics" (PDF).
One question that you should clarify for your own benefit is whether you are interested in learning about foundations of mathematics, or about set theory. Set theory is an important tool in the field of foundations of mathematics, and it is also a topic of study in its own right. So, for example, well-regarded books such as Kunen's Set Theory: An Introduction to Independence Proofs and Jech's Set Theory will teach you a lot of set theory, but they will not teach your much about foundations of mathematics.
If you are genuinely interested in foundations of mathematics, the literature list is more difficult, because the topics are spread around many fields of math, and there is no single reference that will contain everything, much less present a coherent view of foundations.
If you are interested in the role set theory plays in foundations (compared to the study of set theory for its own sake), one very nice book is Foundations of Set-Theory by Abraham Fraenkel, Yehoshua Bar-Hillel and Azriel Levy. Levy's book Basic Set Theory is actually a graduate level text, is also very good at emphasizing foundational issues, and is now available from Dover.