My personal definitions without looking at a thesaurus:
Pragmatist: "Looking at the facts, option 1 is much more likely to prevent the bad thing than option 2." Idealist: "But then this other bad thing would happen. Wouldn't it be nice if we went with option 2 instead and everything turned out perfectly?"
Being pragmatic means you do what is necessary to complete a task. In it's extreme it is little more than cold calculations devoid of any emotion or morals to achieve the goal. Think of how machines would work. The opposite is an idealist, someone who may not do what is necessary because it opposes any ethical code they may have or other pre-conceived views. It's a more emotional response.