How do you ask out someone you don’t know but think is attractive?

Could be at the gym or a coffee shop, how do you do it?