A certificate is automatically generated once you complete all required lessons of an eligible course. You can download it as a PDF from the Certificates section of your dashboard.
Check that the course actually offers a certificate before starting, as not all courses do.