tldr; Combines the movesets of both Pokémon. Some fusions have access to fusion-only moves. Uses a formula to calculate type, stats and abilities.
When fusing two Pokémon, you can pick which one will be the head and which one will be the body. Pokemon displayed above fusion sprites are in the format head/body. Because the fusion order of the Pokémon matters, any two (unique) Pokémon can make two different fusions.
A fusion has the combined moveset of both of the Pokémon used to make it. Expert and Legendary moves (or fusion moves) can only be learned by specific Fusions. There are cases like Dusclops/Latias and Latias/Dusclops where only the former can learn the move Psychic Terrain despite being made of the same base Pokémon (Order matters!).
A Fusion's base stats are based on a weighted average of both halves, as follows:
(2/3)xBody + (1/3)xHead for Atk, Def, and Speed
(2/3)xHead + (1/3)xBody for HP, Sp.Atk, and Sp.Def
This means that a Pokémon with high Atk, Def, and Spd will make a more effective body than head.
You can choose the nature of either Pokémon used to make the fusion.
After fusing two Pokémon, you can pick which ability of the two you want the fusion to have.
A Fusion's types are the head's first type and the Body's second type (e.g. Zubat is Poison/Flying. Any fusion with Zubat's head will be part Poison. Any fusion with Zubat's body will be part Flying.
A Zubat's head on a Grimer's body would be pure Poison).
The body will provide its first type instead of its second if the head is already providing that type (e.g. Grimer/Oddish is Poison/Grass. Oddish normally provides Poison as a body, but Grimer already provides Poison;
so to avoid redundancy, Oddish instead provides its primary type, Grass).
Items that provide bonuses to specific Pokémon can be used by fusions if that Pokémon is the body of the fusion (e.g. Pikachu's Light Ball, Marowak's Thick Club, etc).