It is always advisable to make an appointment before visiting a Social Security office. You can make an appointment by calling 1-800-772-1213 (TTY 1-800-325-0778) between 8:00 am and 7:00 pm, or directly call the local office you want to visit. Appointments are rarely available the same day or even the same week, so it is advisable to plan ahead.
An appointment will save you time on the day of your visit, though if you have a more urgent matter, you probably have no choice but to go to your nearest office and wait in line. If the service you are needing is available online, this is another option if you are time constrained.