When you're first putting together a cover letter and a resume, looking at examples is a great idea. It's easy to find many examples with a quick search online, and this can help you get an idea of what some people consider quality application materials.
However, I'm not a fan of templates. This is when you download something and then change only the information specific to you and the position you're applying for. Why is this a problem?
Well, keep in mind that hiring managers often look through dozens, even hundreds, of resumes and cover letter. If a template is easily available online, then a hiring manager is going to end up with multiple resumes that look exactly the same or cover letters that use the same phrases. Far from assuring that your materials will be high quality, this immediately pegs you as someone who is lazy or unoriginal.
Another problem with using cover letter templates or, worse, lifting entire sections of example cover letters put online for your reference, is that they tend to sound ridiculous out of context. For example, when hiring for a student position recently, I had multiple people use the exact same aggressive-sounding "This is why you need to hire me now" cover letter script. While this might (!) be appropriate for an experienced professional applying for an intense sales position or the like, it's over-the-top for this particular context.
Plus some templates are just bad. You might be tempted to copy something from online because it's hailed as being an example of a great resume or cover letter, but that doesn't mean everyone would agree. Many times the examples you find online are ones that are unusual, where someone took a chance on the format or being overly aggressive or overly casual, and it just happened to work for that particular position, company, applicant, or hiring manager for some reason. But in any other context, that application would have been tossed.
Look at examples. Read tips. But put together your own materials. When they're genuine and passionate and individual to you, you're going to find you have a lot better success than trying to copy someone's "great" example.