Foreign law, or national law, defines the role of governments to the people they govern and controls relationships between people. It may regulate foreign persons and entities, but it does not have effect outside the boundaries of a nation.
Comparative law is "the study of the similarities and differences between the laws of two or more countries, or between two or more legal systems. Comparative law is not itself a system of law or a body of rules, but rather a method or approach to legal inquiry." (Berring, How to Find the Law, 9th ed., p 565).