Step 1. Notice I have sweaty palms and a racing heart.
Step 2. Determine what is going on around me: Is there a big bear behind me? I must be afraid. Did I just get an award? I must be excited. And in the case of sexual attraction - am I on a date with someone I like? I must be really attracted to them.
Most of the time, this two step process should lead people to correctly figure out why they are feeling the way they do. How likely is it that you are being chased by a big bear but your heart is racing because you are nervous about a big talk you have to give next week? However, as I mentioned above, there may be times when this process leads people to misattribute their physiological arousal to the wrong environmental cue, such as assuming you are really attracted to your date after you ride a roller coaster together.