Madison's terminology (for example in Federalist 10) confuses people. He contrasts "democracy" with "republic," and praises the latter. But as the democratic theorist Robert Dahl says, the real difference between the two is semantic and cultural -- one looks to Greece, the other to Rome, but both are all about popular control of government. Better to read "direct democracy" for Madison's "democracy" and "representative democracy" for Madison's "republic." Both are forms of democracy, and neither is inherently better or worse (or, to use the word that makes me cringe in this context, "pure").
Democracy is rule by the people. (See below for an important clarification). At least in a first-order sense, it's democracy whether the people themselves decide public policy (as in a direct democracy), or if the people elect some subset who then decide public policy (representative democracy). It's true even if decisions are made by a mixture of those directly elected by the people and those indirectly elected, as was true of the original Constitutional scheme (and is still true today with respect to the courts). What matters is whether it comes down to the people or not. And thus what makes a polity less democratic is if there are portions of its governance that are beyond the reach of the people (directly or indirectly). Obviously, that would include anything like an aristocracy (by birth) or a monarchy, or an unelected dictator. Democracy is also threatened, or diminished, when elected officials, once they're elected, can do whatever they want without any constraint. Democracy is threatened, or diminished, when parts of the government are removed entirely from any sort of popular control -- if, for example, the actions of a bureaucracy (including those bureaucrats that are the armed forces) are beyond the reach of elected officials.
Democracy, at least in my view, is also threatened and/or diminished if the government only represents a subset of the people -- even if that subset is the majority of the electorate. I've quoted Hannah Arendt before on this subject, and I'll turn to her again:
...we commonly equate and confound majority rule with majority decision. The latter, however, is a technical device...In America, at any rate [the Constitution was] framed with the express and conscious intention to prevent, as far as humanly possible, the procedures of majority decisions from generating into the "elective despotism" of majority rule (On Revolution, 164-165, or at least it was in the old editions).This is true whether the minorities are ethnic or religious minorities, or minority interests (such as farmers in an overwhelmingly non-agricultural nation), or minorities of opinion or ideology.
Madison has, roughly, two solutions to the problem of preventing the natural "technical device" of majority decision from become majority rule. The one we're most familiar with is basically to generate any number of new technical devices to prevent simply majority votes from becoming simple majority decisions: representative instead of direct democracy, separated institutions sharing powers, bicameral Congress, and federalism are all Madisonian devices for this purpose. This works, as Madison famously discusses in Federalist 51, because individual ambitious political actors will be unwilling to go along with any simple conspiracy of the majority; it also works just because a successful conspiracy of this type is so hard to put together. The other solution, as I discussed earlier today, is just making the nation so big that there are no real natural majorities.
I should tie this to the filibuster, since that's what everyone is interested about...I don't think Madisonian ideas push anyone either for or against the filibuster. To the extent that any particular set of rules makes governing impossible -- I'm looking at you, California -- then I think I'd object to them on Madisonian grounds (because if no one can rule, then the people are not ruling). I don't think that's quite true of the filibuster, but it's a concern. Of course, just as Madison didn't want any single majority to rule, he certainly didn't want any (single) minority to rule. I don't think that's really the case in the Senate right now, but again it's a fair concern.
A couple of other notes. First, on why majority rule (as opposed to majority decision) is problematic. In addition to Madison's concern with tyranny of the majority, we can add two other issues. One is the problem of intensity -- generally, our intuition is that in cases in which an indifferent majority opposes an intense minority, we feel that the proper -- the proper democratic -- solution is for the minority to win. A pure majority-rules system cannot accommodate that intuition. The other, more complex, problem has to do with mathematical properties of voting, and I hate explaining it because I'm not very good at it -- but, basically, voting doesn't necessarily do what we want it to do in cases in which there are multiple voters and multiple choices. So what we think of as majorities may in many cases actually be artifacts of (arbitrary) voting rules.
Second, I said at the top that democracy is rule of the people. It's extremely important to distinguish between The People, thought of as a united group with a single clear interest, and the people, understood as plural, with all kinds of differences and disagreements and colliding interests. Democracy is interested in the latter -- the former is an excellent path to tyranny of all sorts of nasty kinds. My advice is that whenever you hear anyone talking about "the people," be sure to think about which of these they're talking about.