Patents, copyright and trademark work in different ways.
The Iphone was trademark, and it's possible to have the same trademarked name in use by different companies, as long as they are in different fields - see the dispute between apple computers and apple corp (beatles), which for a long time basically meant that apple computers couldn't legally use the apple name for anything related to music.
Without knowing more about the actual patent and if anything was done with it, it's hard to say if it has any merit - you can come up with an idea and not actually develop it, and have the patent upheld, depending on how close a later developed product is to the original patent. It's quite possible to patent an idea years before the actual technology has reached a point where it's possible.
You generally patent the process or a way to implement a process, you don't have to have a working model (although it is a good idea to), as in some (many?) fields if you wait too long you risk someone else patenting it (so you want to get it patented as early as possible to protect yourself).
Once someone can show prior art (IE a previous example of the idea/method in the patent), the patent tends to be thrown out.
It's the reason Immerson and Nintendo came to an amicable agreement over their similar patents, they had both developed similar ideas and patented them at about the same time so both had a good chance of winning any legal dispute.
There are however a number of parasite companies, who basically just file patents on anything and everything, including things that have been around for years (IIRC one such patent covered something that was originally shown in an Altar computer, and the patent was filed 20 years after it), in such cases the courts have to decide if it's valid or not (and are usually pretty good).