Officially, Shabbat starts Friday at sunset (sheqi'a). Sunset or sundown occurs when the sun disappears from the horizon. For centuries, it wasn't easy to determine when sunset precisely occurred: it changes virtually every day and if it is a cloudy day, sunset could only be estimated. (See how to find out sunset time, in the link below)
Now, although Shabbat officially begins at sunset, we receive Shabbat earlier than sunset time. Why? Because we have a Mitzva to add time to Shabbat, before it starts and after it finishes. So we take a few minutes before sunset and convert them into Shabbat time, showing our enthusiasm to start Shabbat. And we do the exact same thing at the end of Shabbat, extending Shabbat for a few more minutes, to show that we don't want Shabbat to be over yet.
How long before sunset should we receive Shabbat? Technically, the Mitzva of adding time does not specify how much time to add, as long as we add some time before sunset. The conventional custom, however, is to add 18 minutes before sunset. In most calendars, nowadays, we are given already the time of candle lighting, 18 minutes before sunset. For example: today, Friday January 28th, sunset in NYC is at 5:08, so virtually every calendar will show Candle Lighting time at 4:50 PM (+1/-1min).
In case of any need, however, one can still light the candles, drive or do anything up to five minutes before sunset. (Five minutes is not just an addition but also a safe 'time-buffer-zone').
Shabbat Ends in NYC: 5:59 PM
You can find out the exact time of sunset (+1/-1 min) checking in any local newspaper,or online at http://www.ou.org/holidays/calendar#calendar