A cog was a medieval (XIII-XVth centuries) merchantman and warship alike. It was designed upon earlier Norman longships, but was bulkier and suited for carrying large cargo. The "castles" mounted on prow and stern were treated as lookout posts, command bridges or a place for soldiers and archers to fight the enemy from.
Here is a small cog flying the colours of the city of Elbing (medieval Prussia and member ofthe Hanse, today part of Poland), sailing across the Baltic.