Depends who it is. If I know them, I'll go based off of what I know about them. Some people feel embarrassed, so I would leave them alone and ask if they're okay later. Some people want to be comforted while they're crying.

If it's a stranger or I don't know the person's preference, I'll ask if they're okay and if there's anything I can do, and take it from there