WHAT HAPPENS when the leader of a president's party in Congress takes on that president on one important policy after another? Who prevails on which issues? And, to thicken the plot, what effect does it have on the next presidential election, if the party's leader in Congress is a candidate? It seems likely we'll get answers to these questions in the months and next couple of years ahead.

For Bob Dole, the Senate majority leader, on almost every important issue that's come up this year has been staking out positions independent of if not downright opposed to the positions of President Reagan. He helped develop the budget deficit reduction plan that President Reagan first endorsed and then abandoned. He is notably more cautious about tax reform and more open to trade restrictions than the president. As a Kansan, he is likely to favor a more generous farm bill than the administration, though he stood against what he considered overgenerous relief to farmers last winter. He has backed sanctions on South Africa. He was one of 10 senators intervening against the administration's position in a Voting Rights Act case.

In all of this he has shown political aplomb -- and taken political risks. As it happens, most of this year's big issues -- tax reform, the farm bill -- are matters on which he would have been a major force, by virtue of committee position, knowledge of detail and strength of conviction, even if he weren't majority leader. But he has spoken not just for himself but for the large majority of Republican senators as well; like Howard Baker before him, he has spent untold hours listening to his colleagues' plaints and helping with their pet projects, and in the process has molded an amazingly cohesive Republican majority. He receives little flak from the small number of Republican senators who consider administration policy too assertive or from the larger number of Republican senators who fret that the administration is too conciliatory abroad and home.

And, for the moment at least, relatively few Republicans outside the Senate are charging that Mr. Dole is disloyal to his party's administration. In the skirmishing for the 1988 nomination, enthusiasts for traditional positions on cultural issues are busy questioning Jack Kemp's and George Bush's commitment to their causes; Mr. Dole's sometimes greater apostasy is overlooked. Enthusiasts for supply-side economics have long recognized Mr. Dole as an adversary, but they're on the defensive themselves for their devotion to free trade, and few practical politicians share Mr. Reagan's zealous opposition to any tax increase to help reduce the deficit.

Mr. Dole's boldness in staking out his own positions is a political gamble. For 1988, it's a bet that events will bear out the Dole rather than the Reagan policies, with which Mr. Bush inevitably and Mr. Kemp probably will be associated. He's also betting that the requirements of the majority leadership -- the need to take stands on issues, the need to stay in Washington and tend to business -- will outweigh the disadvantages; Mr. Baker, who relinquished the position, bet the opposite way. Finally, he's betting that the Republican nominating electorate won't produce as culturally tradition- minded and economically supply-side-oriented a national convention as in 1980 and 1984. So far, things seem to be going Mr. Dole's way, a little bit: he's risen significantly in presidential polls this year, and the White House doesn't seem either inclined or able to punish him for what some call his apostasy. Mr. Dole's gamble remains a long shot, but not quite as long a shot as it seemed a few months ago.