Plane:
Cuscatlán International Airport (SAL) near San Salvador receives a number of international flights, for example with the national airline TACA, which is actually comprised of 5 different Central American airlines. It mainly flies to cities in the United States, Canada and countries in Central America, but also has flights to Bogota in Colombia, Lima in Peru and to Madrid in Spain.
By Train:
For the time being, there are no rail links to neighbouring Guatemala.
By Car:
El Salvador has four border crossings with Guatemala and three with Honduras, where you can enter by car. You must have proof that you own the car of have your rental documents ready. An international driving permit is sufficient to enter the country and you have to leave the country within 30 days.
By Bus:
Trans Mermex offers services between El Salvador and Guatemala, while Pullmantur has buses to Guatemala and Tegucigalpa in Honduras. Transnica has buses between El Salvador and Managua in Nicaragua. Ticabus has a wide range of services, from Tapachula in Mexico through Guatemala and on to San Salvador and buses from San Pedro Sula and Tegucigalpa in Honduras to San Salvador. There are even buses from as far as Panama, through Costa Rica and Nicaragua to El Salvador.
By Boat:
You might be able to catch a boat to neighbouring countries like Guatemala, Honduras and even Nicaragua, but these do not include scheduled passenger services, rather irregular boats now and then. La Libertad and La Union are your best bet to shop around.