A mortar is a weapon that fires explosives shells, the one you see here is an emptied shell or bomb. They are fired at close range as they do not have a long range. Mortars have been used since the Medieval times in various shapes and sizes.
This mortar would have been deployed with a German “Granatenwerfer 16” that could throw the grenade up to 460 meters. This grenade launcher was a spigot-type mortar that consisted of a solid rod instead of the hollow mortar tube.
For more information check out: http://www.kaiserscross.com/246801/246822.html