Update 2019: RETS has been deprecated, and replaced by RESO Web API: “MLS, brokers and technology partners should put all their effort into converting to the RESO Web API as soon as possible” (Realtyna article). The National Association of Realtors threatened to pull the E&O Insurance of MLSs who don't provide RESO Web API support: “The deadline to implement the RESO Web API was June 30, 2016” (Vendor Alley article).
Here is a general overview of RETS (Real Estate Transaction Standard) with links to documentation to get you started.
RESO (Real Estate Standards Organization) is the organization which develops and maintains RETS.
What is RETS? (link)
"The Real Estate Transaction Standard is a common language spoken by systems that handle real estate information, such as multiple listing services."
"For software developers and for providers of services like IDX sites, RETS means having to write programs to use only one language, the common language of RETS, in order to work with many different MLS systems."
The RESO Developer page is a good starting point to developing with RETS.
For a detailed technical documentation on how to work with the RETS protocol, consult the RETS specification documents.
Many open source tools and programming libraries in many languages are available which handle some of the heavy lifting for you with the RETS protocol. The RESO Tools page has an extensive list.
DMQL (Data Mining Query Language) is the query language used to filter your RETS search criteria.
Consider this query: (ListDate=2013-01-01+),(Price=150000-200000),(Status=ACT)
which retrieves all listings with a Listing Date on or after 01/01/2013, a listing price between $150,000 and $200,000, and a Listing Status of Active.
A good introduction to DMQL can be found here.