Nintendo Event
To download the "Azure Flute" from a Nintendo Event, you must first have access to a wireless connection. Once a wireless connection has been established with your Nintendo DS, you can select the "Mystery Gift WFC" option from the main menu. This will begin downloading the "Azure Flute" to your game. Once the download is complete, you can travel to any PokeMart in the game and talk to the green attendant to receive the item.
Action Replay
Using the Action Replay device is fairly simple. The game plugs into the Action Replay, as if it were going into the DS's cartridge slot, then the Action Replay itself goes into the DS's cartridge slot. Once the system is on, you can access the codes screen and input this code (without the quotations):
"94000130 FCFF0000, B21C4D28 00000000, B0000004 00000000, 0000AA3C EDB88320, 2000AA68 0000000A, D2000000 00000000"
From there you can start the game normally and go to any PokeMart. Once in a PokeMart, talk to the attendant wearing green and he will give you the "Azure Flute."
Arceus
To access Arceus at the "Hall of Origin," you will need to have defeated Palkia or Dialga at the summit of Mt. Coronet. Once this has been completed, go back to the summit and play the "Azure Flute." A set of stairs will appear, with Arceus at the top of the stairs. Arceus is the highest level wild Pokemon in "Pokemon Diamond" at Level 80, so it is exceedingly powerful and can demolish most lower-level Pokemon with one blow. As Arceus is a Normal-type Pokemon, its only weakness is Fighting-type Pokemon, so plan accordingly and bring plenty of potions to heal your Pokemon.
Warnings
Using an Action Replay to hack or modify you "Pokemon Diamond" game file can have disastrous results. Many people have complained that their game files have been corrupted or even erased after using an Action Replay. Nintendo also checks every game to see if it has been modified in any way, meaning that you will not be able to use your "Pokemon Diamond" game in any official Nintendo Pokemon tournament.