There are many factors that affect how people vote.
Perhaps the most important factors are social/demographic characteristics and party identification. We know that in American politics certain groups identify with one party or the other and consistently vote for that party. For example, non-whites vote more for the Democratic Party. People who attend church often vote Republican. These characteristics do much to determine how people vote.
Of course, people do pay some attention to candidates and to issues. If people do not strongly identify with one party, they might look to their own personal perceptions of the candidates. They will look to see which candidate they trust more or which candidate seems more likable.