Seriously, how did Jeff Goldblum get the virus from a Mac into the mothership's mainframe? When they docked, he didn't hook up any type of cables or anything like that, did the mothership have Wi-Fi or something? It is all very confusing to me...
For your actual question: The laptop was hooked up to the ship they flew in on. The ship in turn was connected wirelessly to the mothership (which is how the auto pilot was able to guide them in) and then subsequently connected directly to the ship when it docked. The laptop is clearly hooked to the ship because he uses his laptop to open the ship's outer hull / windows.
In this image you can clearly see the cables running out of the back of his laptop (bottom right corner).
Now for the follow up question - How was a MacBook able to communicate with an alien spacecraft? Here are a few things to consider:
- At the beginning of the movie the aliens were using our satelites to coordinate their attack, which suggests their technology is already compatible in some way.
- Jeff Goldblum was able to isolate the alien signal from the satelites, so he is becoming familiar with their technology
- The alien ship in Area-51 has been there for 50 years
- They've already learned some ways to interface with the ship
- Because we've been studying it for 50 years, some of our technology might secretly be a derived from the alien technology, making it more compatible
Cracked has an article on movie deleted scenes that may shed some light.
But in the seven minutes of cut scenes included in the extended release Independence Day DVD, Goldblum is actually shown tinkering with his PowerBook inside the recovered craft from the Roswell crash site, mumbling something about how the spaceship was running off the same programming language he was able to decipher before (when he first uncovered their invasion plans and all that).
Actually, in 1996, when the movie was made, WiFi wasn't yet common.
As you can see, the laptop is clearly connected to the ship. The ship in turn is connected to the mothership. While it is often scoffed at, if they have had the ship since 1947, they've had ample time to reverse engineer the ship. And it is also strongly implied throughout the movie that much of our own modern technology, like computers, is based on parts from the ship. It is therefore not as far-fetched a proposition as you'd think.
These aliens are single-minded and cruel. It is unlikely that they ever developed a hacker culture. Or they did it so long in the past that they out-grew it and their security structure is outdated. Or even they goofed just like we continually goof when it comes to security today.
They knew that the mothership was linked to each of the smaller ships via some sort of radio link (as he drew a diagram to that effect) and it likely used the same technology and link that the fighters used (which they possessed and could reverse-engineer).
Using the appropriate transmitter (EM waves are EM waves, they don't need to be generated by some alien thing with unobtanium in it), they were able to broadcast a signal that was recognized by the mothership, just as the fighter did in their small-scale test.
I'm not clear on why everyone is talking about wireless connections. The computer is wired to the ship. David was not able to upload the virus until the ship was physically docked to the giant mother ship. So it appears that the upload in fact required a connection through wires.
The little ship surely had radio communication capability to the mother ship, so if it could have been done wirelessly, then they would have been able to upload the virus from the comfort of Area 51.
The aliens in the movie are apparently all psychic, and linked to each other in something approximating a hive mind. If this is the case, the idea of intra-species theft, subterfuge or deceit, from their own members, might be completely "alien" to them (pardon the use of the word). In other words, space commies who actually instinctively believe in the party line.
Added to the fact that it seems none of their victims have ever tried to compromise their systems before, it's not inconceivable that they have no computer security to speak of.
The idea that Jeff Goldblum's character could immediately understand even the natural language (much less programming language) of a mind that must be so completely fundamentally different to a human's in that span of time still leans on the ridiculous side, though.
As for the question regarding the physical-layer networking between the Mac and the alien mothership, we can't see in the movie, but the Mac may be physically connected to the little alien fighter, which is in turn physically clamped to the docking structure.. I recall them having some trouble disengaging from the docking clamps before effecting their escape from the soon-to-explode mothership. Bigger question: 800km object with 1/4 the mass of the moon blasting apart that close to Earth (well within our gravity well, plus a large portion of the ejecta are headed toward Earth, even not accounting for gravity). Wouldn't that be an extinction-level event?
In theory, they did not have to understand the alien system perfectly or design a very intricate/intelligent virus to disable it for a few minutes (Goldblum does say that the window would be only a few minutes). Even in normal computer systems, messing up a few bits in the active RAM or in the critical parts of the hard disk can potentially crash the system or parts of the system. You can potentially permanently corrupt most programs on your computer by changing a few bits here and there in their dll files (assuming Windows, open the dll in notepad and change some characters randomly) without having any understanding whatsoever of how the operating system or the programs etc actually work.
But at the same time, one would assume that an intergalactic space faring race would have robust enough operating systems to not allow one of its own drone ships to randomly write to a critical part of its memory. This could be explained by the open-psych hive-mind characteristic of the aliens. Essentially, since they're all psychic/telepaths, their minds are all more or less open to each other; so it's no stretch to imagine that their computer softwares also mimic the same everyone-has-access-to-everyone architecture. It's very likely that they don't have a master-slave type of architecture between the mother and child ships; rather it could be a distributed system with each and every ship (mother or child) working together as a neural network of some sort. Further, the possible lack of hacker culture (again owing to the telepath/hive characteristics), as mentioned by others, would mean there are not enough safeguards built into the system...specially when up against a human programmer/hacker with a genius level Intellect.
As for the actual physical interface with alien computer, it's all digital processing / electrical signals going back and forth. Assuming that the alien system used electrical signals, the first step would be to fashion the physical connectors to be able to send electrical inputs (figuring out the correct voltages etc by trial and error). Then as soon as we start receiving outputs, it's just a matter of reverse engineering it by brute force (by sending as many variations of inputs possible and categorizing the outputs. As an aside, this would also allow them to eventually figure out how to display a skull by cataloging what inputs display a dot where on the screen etc). This would be very very time consuming but they did have decades, supercomputers and the best industry minds to do this....and finally Goldblum, a genius, came in and was able to make sense of that research data.