The device is called a windlass.
Panama
An anchor windlass is a mechanical device used on ships to raise and lower the anchor. It consists of a drum or gypsy wheel that winds the anchor chain or rope, allowing for efficient control of the anchor's deployment and retrieval. Typically powered by hydraulic, electric, or manual systems, the windlass simplifies the anchoring process, enhancing safety and operational efficiency aboard the vessel.
Locks are built to raise and lower ships , also to control water levels, so there are some locks that also have dams nearby.
The locks
Gravity causes the ships iron anchor to sink to the ocean.
Ahole
unknown
throw the anchor out stupid
seaport
harbor
Yes all Naval ships raise their anchors when the ship is going to move. "Anchor's Away' As soon as the anchor breaks water as it is being raised the exact time is recorded in the ships log and the flag is transefered from the stern of the ship to the halyard over the superstructure of the ship. This pretains to all U.S. Naval vessels.
The links mean nothing. Rope is sometimes portrayed. Either where used to anchor ships in the age of sail.