If it is a plastic flexible duct, it can be very difficult to clean precisely because it is so flexible. But all ducts can be cleaned with "duct brushes". These are round brushes similar to chimney sweep brushes but much softer, with either a string pull or a rod on the handle. If you can't find duct brushes in your hardware store, and want to clean 3 or 4 inch ducts, use a bottle brush or a potato brush -- the kind with the nylon bristles stuck into a twisted wire base. You can shape the base to match the duct, and then run them through.
If you are changing ducts, the straighter the duct, the slower the curves, and the smoother the inside of the duct, the better the air will flow. The best is round riged ducting. The worst is the cheap white plastic spiral ducting.