The Megilat Esther states that the Jews celebrated their salvation by "Mishloach Manot Ish L’re’ehu," delivering dishes one to another. This is the source for the Misva to give Mishloach Manot on Purim.
HOW MANY ITEMS:
The Halacha requires giving two distinct items to one person. This is derived from the wording of the Pasuk. The word "Manot"-dishes is in the plural form, indicating two or more different dishes. Therefore, one may not give two portions of the same item.
Even if both items were packaged together, they are considered separate. Although, the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909 in Torah Lishma, Parashat Tisaveh) ruled that each item must be in separate vessels, Hacham Ovadia ZT"L is lenient, in accordance with the majority of the Poskim and the accepted custom.
WHAT CAN BE GIVEN:
The Halacha requires that Mishloach Manot be comprised of food. It is not acceptable to give money or other valuables. Although, Hacham Ben Sion permitted giving a voucher to eat a meal in a restaurant, assuming that the recipient would eat two different dishes there on Purim.
The food must be fit for consumption. Therefore, one does not fulfill the Misva by giving items with sub-standard Kashrut. If one gave candies to a diabetic, he fulfilled the Misva, because even though the recipient cannot eat them, he can pass them on to his children etc.
Women are obligated to give Mishloach Manot. Modesty dictates that women should give to other women, whereas men should give only to men. Special caution is required that men should not give to unmarried women, to avoid an issue of Kidushin, i.e. the gift may have marital implications.
Boys and Girls over the age of Bar and Bat Misva are also required to give Mishloach Manot.
TO WHOM IS IT GIVEN:
The word "L’ReEhu" in the source Pasuk is singular, indicating that one recipient is sufficient. The purpose of the Misva is to enhance the joy and brotherly spirit of the holiday. Therefore, the more people one gives to, the better.
Since the reason for the Misva is to increase joy, Mishloach Manot may be given to any Jew, even if he is wealthy. In addition, it follows that one may not give the Mishloach Manot anonymously. If the recipient does not know the identity of the sender, the "Unity Effect" is not achieved.
The Aruch Ha’shulhan (Rav Yechiel Michel Epstein of Nevarduk, 1829-1908)adds that the recipient must find out about the gift on Purim. If one left Mishloach Manot for someone who is away until after Purim, that recipient will not enjoy the gift on Purim. Therefore, one should call or text the recipient on Purim so that they are aware of the gift.
Mishloach Manot is a Misva on the day of Purim, preferably right after the morning Megila reading. If one gave at night, he has not fulfilled his obligation.