Android 4.0 introduces WiFi Direct in to the core of android. it basically creates an adhoc connection between one device and another using WiFi by creating what I guess could be considered an Access Point. You do not need a wifi access point to use WiFi Direct, and actually, if you are connected to wifi when turning on WiFi direct, it will disconnect you. You cannot be connected to both an Access Point and enable wifi direct.
The host device acts as an access point for other devices to connect to, then through other pieces of software, files and other data can be shared or streamed to the client device(s).
To use Wifi Direct, in settings -> wireless & networks
you have to enable it. Then you should have an option to "share" via wifi. This works a lot like bluetooth sharing, where the other device has to be "ready to accept" your files. You will only be able to do wifi direct with devices that have explicit support for wifi direct. Android 4.0 is the the first version of the OS to have built in support for wifi direct. The Samsung Galaxy S II does have support for wifi direct as well. This was an added feature Samsung put in to their TouchWiz version of Android. While the settings for it are a little different then in Android 4.0, they basically work the same.
There are other devices, like some TVs by Sony, that also have wifi direct support.
Wifi Direct is not hardware specific, its part of the OS. If the device supports wifi then it supports this. It is part of the CORE OS in Android 4.0. Any device that has Wifi and is running ICS, this will work with. Some Samsung devices (I think only the Galaxy S 2) have support for wifi direct even though they are not running ICS. This is because Samsung added the support for it in to their version of Android.
While the Galaxy Nexus is manufactured by Samsung, it does not run the Samsung modified version of Android. It runs a completely "Google Experience" version of Android. The WiFi direct that exists on the Samsung Galaxy S II is different then the one built in to Android 4.0.
Here is the android SDK docs that talks about support.
Wi-Fi Direct allows Android 4.0 (API level 14) or later devices with the appropriate hardware to connect directly to each other via Wi-Fi without an intermediate access point. Using these APIs, you can discover and connect to other devices when each device supports Wi-Fi Direct, then communicate over a speedy connection across distances much longer than a Bluetooth connection. This is useful for applications that share data among users, such as a multiplayer game or a photo sharing application.
Here is a screen shot (taken from this video) showing wifi direct setting available on a Nook Color running CM9. The video is at the location where it shows wifi direct working.
Here are 2 screenshots from my viewsonic g-tablet that is running ICS (this is not a CM9 Kang, it is vanilla AOSP android). The first shows the setting, the second shows that i turned it on.
To show that WiFi Direct is actually part of the core of android and not just CM9, here is the source code for the WiFi direct settings. This is the github mirror of the AOSP. You can compare it to CM9 source too.