Koper can trace its name back to the Roman town of Caprea. In 1278, the town voluntarily joined Venice and was later renamed Capo d'Istria — hence the Italian name. However, much of Koper's Italian inhabitants fled after WW2 when the town was assigned to the Free Territory of Trieste, administered by and later incorporated into Yugoslavia. The Communists built an unattractive sprawl of factories and warehouses to the south, but mercifully left the old town almost entirely untouched, and it's this that draws the (comparatively few) tourists who venture this way.
Koper is easily reachable with bus and train. The train and bus stations are adjacent and located about 1 km south of the Muda Gate to the old city. The nearest airport is in Trieste (64 km), although Ljubljana's (124 km) is also an option.
From Ljubljana, there are hourly http://wikitravel.org/wiki/en/index.php?title=Koper&action=edit§ion=2buses and 5-6 trains daily, both taking around two hours. There are also direct services to Trieste in Italy between 3 and 6 times a day costing about €3. The journey between Trieste and Koper takes between 30 and 60 minutes.
Koper's Old City can easily be covered on foot.
Koper's main sight of interest is the Venetian-era old city, which is in much worse shape than that of Piran, but hence also feels more real. Repairs and restoration are slowly under way.
The center of the old city is Tito Square (Titov trg), an austere piazza surrounded by slowly crumbling palazzi. From here, the cobbled Čevljarska ulica leads south and Kidričeva ulica leads west to the marina.
There are no beaches to speak of, although you can pay a few euros to bathe in the sea just north of the marina.
The rest of Slovenia's short coastline is easily accessible from Koper. Public bus service is available every 20 minutes to: