According to copyright law, you can copyright creative expression but not anything that is necessary to the functionality of what you're building. However those might be protected under patents, trademark, or trade secrets laws.
Previous to this case, the code that implements the API can be copyrighted, since it is possible to implement the functionality with different code. But the code that specifies the API interface is absolutely required for compatibility if you want code that is written for one system to be compiled against the other.
However a national precedent put down by the Federal Circuit (the same court that caused software patents to blossom out of control) decided that there is enough creative expression in API interfaces for them to be copyrighted, despite them being necessary for compatibility.
Most people in software think that the previous precedent was better. Hopefully the Supreme Court will agree. (They overturn the Federal Circuit more often than not.)
Going to your fast food example, I'm pretty sure that trademark law applies, which is quite a bit different. But you can't copyright or trademark the act of making the meal larger. (You could patent it..but McDonald's didn't. And even if they had, the patent would now be expired.) But you can trademark the term used to ask for it. And so Wendy's is not allowed to use that term. They can understand it, but not use it. However at some point if "supersize" falls into common use, Wendy's could file a lawsuit saying that it is generic, and THEN they could use it. (Losing trademark due to a term becoming generic is one of the differences between trademark law and copyright law.)