As stated on the concepts and definitions page, trim is the inclination of the ship’s designed horizontal fore and aft plane with the surface of the water in which she floats. When in normal trim this plane lies parallel with the surface of the water. The condition of trim will depend on the fore and aft distribution of weight, ie cargo, fuel, etc. and the underwater shape of the hull.
When discharging cargo, the loss of weight from the particular section of the vessel must be counterbalanced by compensating for the loss, ie through shifting of ballast from one tank to another. Incorrect trim can adversely affect the handling of the ship.