Doctrine - any truth taught by the Church as necessary for acceptance by the faithful.
The truth may be either formally revealed (as the Real Presence), or a theological conclusion (as the canonization of a saint), or part of the natural law (as the sinfulness of contraception). In any case, what makes it doctrine is that the Church authority teaches that it is to be believed. This teaching may be done either solemnly in ex cathedra pronouncements or decision of an ecumenical council, or this teaching may be taught ordinarily in the exercise of the Church’s magisterium or teaching authority.
Dogmas are those doctrines which the Church proposes for belief as formally revealed by God.
The difference in Dogmas and Doctrines is the level of certainty with which the magisterium teaches. Dogmas are taught with absolute certainty (beyond all doubt whatsoever), whereas doctrines are taught with moral certainty (similar to beyond reasonable doubt).
Dogmas require the assent of faith, meaning that obstinate doubt or denial of the truth of the dogma is the sin of heresy–a sin against the virtue of faith.
Doctrines require religious submission of intellect and will. Refusal to submit to doctrines of the Church is not a heresy, not a sin against faith, but a sin against charity. We are called to “obey our leaders and submit to them” (Heb 13:17). To dissent with doctrine is incompatible with humility, loyalty, and charity. It is a matter of placing one’s own fallible intellect and will above that of the mind of the Holy Catholic Church.