It means "How are they in comparison to each other?" The expression is usually used for things that are similar but not the same, in this case the FBI and the CIA.
It's a question on similar points and differing points and, depending on what you're asking about, the pros and cons of one thing as compared to another.
You could use it when, for example, deciding which car to buy out of two or three different ones. You might ask someone, "How do the Ford Focus and the Honda Civic compare?" They might answer by saying one of them is a little roomier but the other offers better mileage, that both have a similar top speed, that spare parts for one of them are much cheaper, etc.