I understand both are some kind of bowl but I would appreciate if someone could explain about the uses for each one.
Can a "ちゃわん" be used for cooked rice? Can a "どんぶり" be used for ramen?
While there is a history of the naming of どんぶり, suffice to say that they are generally larger and normally used for meals rather than beverages.
There is no definitive consensus as to minimum size requirements to call something どんぶり or 丼鉢｛どんぶりばち｝(which is why one shop might call a middle-sized bowl a どんぶり while another calls it ちゃわん), but if it looks like it is more suited to a large bowl of rice (or noodle dish) than a cup of tea then most people would use どんぶり.