What types of titles do you underline and what types of titles do you put quotations marks on?
Underlining is a relic of when people had typewriters or wrote things out in longhand. You only underline things that you would normally be set in italic, but for whatever reason, that option is unavailable to you. For example, when turning in copy written on a typewriter or in manuscript, one would underline things that should be set in italic.
Italicization can vary according to house styles, but normally, the titles of books of any sort, plays, operas and the like, art exhibitions, newspapers, magazines, academic journals, brochures and pamphlets, newsletters, films, and TV or radio series should all be set in italic. So are the names of vessels like ships and other watercraft, aircraft, spacecraft, and trains. The names of long (well, very long) poems get set in italic, but not shorter ones. Taxonomic names of genus, species, and if available, subspecies are all set in italic, but not the names of family or higher, which are only capitalized. Species and subspecies are not even capitalized, but anything higher is.
Novellas (short novels) are sometimes set in italic, particularly if published standalone, but sometimes are only quoted. Novelettes and below, including short stories, individual episodes, songs and all individual musical compositions, poems, and essays and articles of any length are set off by quotation marks, not italics.
Other things will vary according to the discipline and publication, like animal gene names and symbols, but not protein names and symbols.
Depending on the style and the relevant manual(s), you might find a good online resource with noodlebib.
The Noodlbib prompts can filter what kind of source you wish to cite be it MLA, APA, or Chicago, and the result is formatted bibliography/sources cited entry.
It is free to the public, and you can also save your citations if you create an account. So far, my cross-references have not contradicted this resource, but you must be specific about the details regarding source material if you want the correct citation format.
Generally in MLA, titles of books (books being longer than novellas) are underlined, whereas short stories and plays are italicized. Formatting tautologically depends on style.