I have seen people from our neighborhood playing Nintendo DS or Nintendo GameBoy Color on their PC. How did they do it?
For GameBoy Advance, the best one is VisualBoy Advance (http://vba.ngemu.com/). It has a large list of features and high compatibility. Not only does it support GameBoy Advance games (GBA ROMs), but also GameBoy (GB ROMs) and GameBoy Color (GBC ROMs and SNES Super GameBoy).
If you want an emulator with multiplayer support, then you will need VBALink (http://www.vbalink.info/download-gba-emulator.htm). It is based on the VisualBoy Advance source codes, so looks the same as VBA, but adds link emulation to it.
for games you need someroms:
Now it is time to unzip VBA / VBALink to your hard drive. You will get a file called VisualBoyAdvance.exe, "COPYING", "NEWS" and some other text documents .
You will also need to unzip A Game GBA - make a note of where you extracted it to. For example, to make things simple I extracted both VisualBoy Advance and Asteroids to the root of my C: Drive
Run the program VisualBoyAdvance.exe. Go the "File" menu, either by clicking it or holding Alt+F. Select "Open..." from the dropdown menu (or press Ctrl+O) if you are planning to open a GameBoy Advance game. Just navigate to where you extracted it on your computer. In my case this was the root of the C: drive, so it is already there. The game is a file called GameGBA.BIN. Some games (especially homebrew ones - those made by freelance programmers) come with the .BIN extension but most use the standard .GBA extension. That should bring up the Game screen:
If you are not happy with these controls, you can go to "Options" -> "Joypad" -> "Configure" -> "1" and change the controls here:
lots of options in here :D
They probably used an emulator. These are programs for your computer than make it possible to play games intended for consoles.
Zophar's Domain has a fairly definitive list of GameBoy emulators. Once you have an emulator you're going to need ROMs, which are the files that contain the actual games. ROMs can be opened with your emulator, but the files can be hard to find. Lots of sites on the Internet offer them; all are illegal.
To answer your question: your friends are pirates. Yarr.