City of Derry Airport is about 10 kilometres east of the city centre, with flights to London, Dublin, Glasgow, Manchester, and a handful of other UK and Irish destinations. A taxi into the city takes about 15 minutes; there is also a bus service.
Belfast is an hour by road (about 120 km) or by rail — the train runs from Derry's Waterside station to Belfast Central. Dublin is about two and a half hours by road via Letterkenny or through Omagh. There are also regular Bus Éireann and Ulsterbus coaches connecting Derry to Belfast, Dublin, and other towns in Northern Ireland and the Republic.
If you are coming from Donegal — which is directly across the border and well worth combining with a Derry visit — the main crossing is at Lifford/Strabane, about 20 kilometres south. Note that Derry is in Northern Ireland (UK), so different border rules may apply depending on your circumstances.