If a presidential candidate wins the popular vote in a given state does this mean that the electoral votes go to that candidate?

Yes, however there are a few exceptions. The first is that 2 states, Maine and Nebraska chose their electors by congressional district. In these states it's possible that there could be a split vote. This just happened in the 2008 election - Barack Obama had the most votes in the Omaha (and area) district and Nebraska split its electoral vote with McCain getting 4 and Obama 1. The other exception are "faithless electors" ... those who do not cast their vote in the electoral college for the winner of the state, even though they are pledged to do so. There have not been many of these, and in some states, this may be an action that is subject to legal prosecution.