To dip a flag that is being carried means to lower it by turning it forward from an upright position to 45° or horizontal.
At sea, it is done by lowering to half-mast and returning to full mast position.
[1] To dip the flag on a merchant vessel passing a naval vessel involves lowering the stern flag (the country flag) to the half-mast position and back to the truck as the vessels pass abeam of each other.
The half-mast position in this case being one flag width from the truck as in the case of half mast.
Some jurisdictions have laws that discourage or prohibit the dipping of the national flag, including India, the Philippines, South Africa, and the United States (with its non-binding flag code only allowing vessels to dip the ensign as a salute to other ships).