Patents are organized by classifications - sort of like books in a library are organized by subject headings. A preliminary patent search requires one to first determine what patent classifications one's ideas fall into - and then search the patents and patent applications in that classification(s).
The United States and many other countries organize their patents by the Cooperative Patent Classification (CPC)