Whether crafted for some fell purpose or forged to serve the highest ideals of chivalry, magic weapons are coveted by many adventurers.
Some magic weapons specify the type of weapon they are in their descriptions, such as a longsword or longbow. If a magic weapon doesn't specify its weapon type, your DM may choose the type or determine it randomly.
If a magic weapon has the ammunition property, ammunition fired from it is considered magical for the purpose of overcoming resistance and immunity to non-magical attacks and damage.