is a nautical term indicating the final preparation of a sea vessel for getting underway.
Weighing anchor literally means raising the anchor of the vessel from the sea floor and pulling it up to the side of the vessel after the engines have been brought up to operating power.
Example of use
USS Marvel (AM-262)'s narrative is described in part in DANFS as "On 17 January 1945 she weighed anchor and began a 2-1/2-month cruise to Kodiak, Alaska."
When not at anchor
When a vessel is not at anchor, but tied to a pier or to another anchored vessel, it does not weigh anchor; the captain or master gives the order to "Cast off lines!"