In Federalist essay number 51, Madison recommends a system of checks and balances. This type of government structure will allow for different branches of the federal government to have different responsibilities. This would ensure that ambition would "counteract" ambition.
For example, in our government the legislative branch (Congress) has the ability to pass laws. This power is checked by the executive branch (president), as he can veto this law. Along with this, the Supreme Court can check Congress's power as well, as they can rule laws unconstitutional.