How can 2 players, 1 with Heart Gold and 1 with Soul Silver trade Pokemon with each other?
Both of you need to have Wifi communications enabled in your DS. This should always be the case if you have an old DS or a DS Lite, but the DSi offers options to disable it.
Once you have done so, go upstairs in any Pokemon Center, and talk to the person behind one of the counters, and follow the instructions. You should be dropped into a room where you can see other players who are also connected over wifi. Talk to another player to trade with them.