Why is a job search letter called a "cover letter?" Because in the era of hard copy resumes and letters, the letter would be on top of, and therefore cover, the resume. A cover letter introduces a resume and explains why you are sending the resume.
If you're sending your resume via email, yes.
If you are speaking to an employer at a career fair (or other event), no.
If you are submitting your resume online (sometimes to an employer's Applicant Tracking System, called ATS; a thing that's good to know about), do what the employer instructs! If there are no instruction, a cover letter can help. A cover letter is personalized and individualized to the employer. (Your resume is not.)
In person, you have a conversation, so you're talking to the employer about why you're interested in their job, and offering your resume. A letter doesn't apply to that situation. You can and likely should send a follow up email afterward to emphasize your interest and thank the employer for their time in talking with you.
When emailing your resume, your email usually serves as a cover letter; it explains why you're sending your resume. (In certain cases, if the employer requests this, or you are in a very formal and/or traditional industry, you might attach a cover letter document to your email.)
What a well-written cover letter (usually email) does:
What if I'm sending my resume to someone who knows me and is going to pass it on to someone else?
In most situations, email is the medium for professional communication in the job search.
Sometimes, in very formal and/or traditional fields, letters are written as documents with certain formatting. That document could then be sent as an attachment to an email (with a clear, concise description of what is attached and why). It's now very rare to actually physically mail hard copy when applying for jobs.
In email format: your contact info / signature block goes below your name at the END.
In document format: sender address and contact info at the top; then the date; then your contact info / address block, which can be left-justified, or centered.)
(if document format) Month, Day, Year
(if document format, the following about the recipient:)
Mr./Ms./Dr. FirstName LastName
That person's job title
Name of organization
(Street or P.O. address if you are actually mailing hard copy; not common.)
Town/city, state (zip code if mailing hard copy; not common)
Dear Mr./Ms./Dr. LastName:
Opening paragraph: State why you are writing; how you learned of the organization or position, and basic information about yourself.
2nd paragraph: Tell why you are interested in the employer or type of work the employer does. Simply stating that you are interested does not tell why, and can sound like a form letter. Demonstrate that you know enough about the employer or position to relate your background to the employer or position. Mention specific qualifications which make you a good fit for the employer’s needs. Focus on what you can do for the employer, not what the employer can do for you. This is an opportunity to explain in more detail relevant items in your resume. Refer to the fact that your resume is attached. Mention other attachments if required to apply for a position.
3rd paragraph: Indicate that you would like the opportunity to interview for a position or to talk with the employer to learn more about their opportunities or hiring plans. State what you will do to follow up, such as call or email the employer within two weeks. If you will be in the employer’s location and could offer to schedule a visit, indicate when. State that you would be glad to provide the employer with any additional information needed. Thank the person for her/his/their consideration.
4th paragraph optional if best to split some of content above.
Sincerely,
Your first and last name
Address as town/city, state (optional zip code)
(You are not required to give your street address; lean toward protecting your privacy, especially when you do not know how your email might be forwarded / shared.)
Phone number
Email address
Generally letters fall into two categories, but the bottom line is to write what makes sense based on the information you have.