Traditionally, diplomas were given to high school students who completed their high school studies around the age of eighteen. Because some adults decide to get their high school diploma after their teenage years, they can do so by passing a General Education Development Test (GED). There are a number of colleges who offer adult education classes geared towards helping students pass the GED. These schools often offer diplomas to students who pass certain courses.
Certificates are generally different than diplomas because they are given out to students who have passed a particular course of study not necessarily related to high school graduation requirements. Certificates show that students have mastered a particular skill usually associated with a job requirement. For example, those who write software may be required to hold a certificate showing that they have learned how to code in a specific computer language like C++ or Java. Some employers don't require a bachelor's or associate's degree in a certain field as long as they know an applicant has received training in a particular skill. This training is often represented as a certificate.
Unfortunately, the difference between diplomas and certificates can become murky at some institutions. Some colleges simply call their certificate programs "diploma" programs. The difference is in name only. It wouldn't hurt to contact a potential employer and ask them if a certain college course fulfills their job requirements or career hopes.