A hulk is a ship that is afloat, but incapable of going to sea. Although sometimes used of a ship that has been launched but not completed, it most often refers to an old ship that has had its rigging and/or internal equipment removed, retaining only its flotational qualities.
A sheer hulk (or shear hulk), in the days of sailing ships, was used as a sort of floating crane, primarily to place the lower masts of a ship under construction. The masts of the hulk would be at an angle, and the ends could be effectively raised or lowered by rotating the hulk's hull, either by pulling on ropes attached to the hull, or by shifting the ballast within the hull.
A prison hulk was simply a hulk used as a floating prison. They were especially popular in Great Britain; the Royal Navy producing a steady supply of ships too worn-out to use in combat, but still afloat. The harbor location of prison hulks was also convenient for the temporary holding of persons being transported to Australia and elsewhere overseas.