Prior art refers to the knowledge that humanity currently has. In other words, knowledge and know-how that pre-dates your invention. For your invention to receive patent protection, you must be able to demonstrate that it is not already known to humanity in some way or the other. In cases where certain aspects of your invention are already known to, or have been invented by others, you may still be eligilble to receive patent protection on the novel parts of your invention.
Searching for prior art can be a time consuming process. Patent attorneys often offer a search service where a law professional can perform prior art searches for a fee. This usually involves searching all existing patents, patent applications, industry journals, research papers, and technical discolure databases. Google is also an excellent place to search for prior art.
Even if you decide to engage a patent search professional, it often makes sense to do a cursory search of prior art just to make sure that your idea is new. This can save you lots of fees if someone has already patented an idea which you were thinking of. This happens more often than you think. There are millions of patents in the world in almost every imaginable field of human endeavor!
IP.com and Research Disclosure are two companies that maintain databases of technical disclosures. Some inventors (or companies) come up with interesting ideas which they don't want to spend money patenting, but at the same time they don't want their competitors to patent these ideas and prevent them from using it. In such cases, they deliberately release the details of the invention into the public domain, so that it becomes prior art. This is called a defensive publication, and it prevents other people from patenting the idea in future. IP.com and Research Disclosure maintain databases where inventors and companies can publish their inventions and make it part of the prior art. Their databases have secure timestamping and other features to accurately record when submissions are incorporated into their databases.
Delphion is a company that maintains a database of patents and patent applications filed in various countries across the world. Google Patents also attempts to index such information, and is a good free alternative to Delphion.