The Berne Convention
The Berne Convention is perhaps the most important copyright treaty the United States has signed. It has three particularly important components. The first is that no signatory country can impose formalities--requirements such as copyright registration--on the protection of foreign works; foreign works should enjoy nearly automatic copyright. The second is minimum standards: every signatory country must offer a baseline of protection. The third is "national treatment": a country such as the United States must provide the same protection to foreign works as applies to domestically produced works. So it is not that foreign copyright applies in the United States, but rather that domestic copyright should be applied to foreign works equitably.
If a country has signed the Berne Convention treaty, then your work produced in the United States is protected under a foreign country's copyright law, not under United States law. Whatever copyright law the foreign country gives to its own authors applies to you.
In the United States, as in most countries, only domestic copyright law applies. So Spanish copyright or British copyright law per se does not apply. That said, the United States is bound to honor intellectual property treaties that it has signed. This means that foreign-produced works will enjoy some measure of copyright protection based on the wording of the various treaties.