HVAC duct design

How a duct is designed?

Is depend upon needed CFM in room and plant layout