How a cylinder is used in science?

Well, that depends on what cylinder you are using. For example, a graduated cylinder is used to measure the volume of a liquid, the measure of a solid by displacement, or for measuring quantities of volumes to be added into a mixture or chemical reaction.