Why do we need SSL certificates?
The server certificate is checked by the client to make sure that it talks to the expected server and not to some man in the middle. That's why the certificate must be valid (not expired, not revoked), must be signed by a CA the client trusts and must be issued for the site the client visits, i.e. subject(s) (which includes subject alternative names) must match the domain from the URL.
what do CA's check when they issuing certificates?
When someone requests a certificate from a CA the CA must check that this person is actually owner of the domain. There are various methods to do this: some send a mail to specific addresses in the domain, some expect the claimed owner of the domain to provide a specific file with a content specified by the CA at a specific position at the domains web site. And for EV certificates the company has to send in various paperwork too.
Additionally some CA check that that the domain is not something which will probably get used for phishing, i.e. containing references to Paypal or similar. For much more detailed information look at the various documents which can be found at the CA/Browser Forum.