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 a mix of both Pokémon, but each half counts for more on certain stats:
The body counts for more on Attack, Defense, and Speed.
The head counts for more on HP, Special Attack, and Special Defense.
This means a Pokémon with high Attack, Defense, and Speed makes a better body, while one with high HP, Special Attack, and Special Defense makes a better 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).