You can take one of the 4 direct train from Ljubljana to Zagreb, mostly go onward to Budapest. The fare was about EUR13 and it take about 3 hours, including crossing the immigration check point clearance.
This is the beautiful train station.
As I came by flight, I did not use any trains here, but I understand that beside local trains you can get long distance connections from here to places such as Budapest or Vienna and it will take only few hours.
Slovene capital Ljubljana and Zagreb are only about 2 hours 20 minutes apart. This would be a very good day trip and has come up intermittently in the forums - here is the current timetable 'there and back again'
Website is for the Slovene side
The main train line in Zagreb connects the west and the east of the city in the most efficient way possible. Most of the people living on the edges of the city are going to be using it, simply because you can avoid all the traffic rush that influences all other sorts of traffic. So, until the metro is built (and that's going to take at least a few years more), if you're going to the center from the west or the east, find your station and use it!
On the right side of the Glavni kolodvor, the Central Railway Station, (near the Post Office) there is a locomotive which use to be a part of Josip Broz Tito's train.
The steam locomotive remainds us the way we used to travel when we were kids.
The train station, Glavni kolodvor, sees more traffic than other points of entry into the city. It is situated right in the heart of the town and very handy to get hotels and all major sights.
The left luggage facilities, Garderoba, are available 24 hours. Each piece of luggage costs 10kn per day (aprox. 1,40 euros).
Getting to town: directly in front of you is Trg kralja Tomislava. It's only a five minutes walk to get the main square, Trg J. Jelacic.
The train station, Glavni kolodvor - The Central Railway Station of Zagreb, seems more traffic than other points of entry into the city.
The facilities: changing currency, calling home, left luggage etc.
Getting to Town: directly in front of it there is Trg Kralja Tomislava, you past three tree-lined parks in a row and after only a five minute walk there is the main square.
Zagreb has a beautiful Train Station with shoppings, restaurants, bank and other services. It is connected with many countries. There are dialy international lines from Munich (Euro City Mimara), Vienna, (Inter City Croatia, Cibalia), Venice (Inter City Kras, Simplon, Venice), Budapest (Drava, Maestral), Paris and Geneva, Graz (Inter City Croatia, Zagreb) and Moscow (Maestral).
We missed the train on the way from Ljubljana but took it for the return journey as it was a much quicker option than the bus and the price was much the same (83 HRK or about 11 Euro) for a single ticket.
We went from the small but very nice Zagreb main station to Ljubljana (Slovenia). The nice Austrian train which connects Zagreb with Munich was on time and comfortable and the train ride along the river was beautiful.
Border checks are rather serious though so you wouldn't want to have forgotten your passport or brought too many cigarettes ;) Which we didn't so we were allowed to enter the European union.
We didn't even pay a fortune for our lovely handwritten ticket, it was around 110 kn for a single ride. Amazing when you are used to German rail prices!!!
This is the most popular public transportation in Zagreb. Although it doesnt run throughout ALL of Zagreb it does a pretty good job of circling the city. But beware there are "police" that can catch you, so make sure you have a ticket!
(picture taken from http://www.subways.net/croatia/zagreb.htm)
The return ticket from Budapest is cheaper than a single, normally when you buy it from the ticket desk and say cheapest, they will give you the return. You can try and re-sell the return ticket in a youth hostel if you need to.
Zagreb's main train station (Glavni kolodvor) is located about a ten minute walk from the city's main square, Trg bana Jelacic. You can get here from many European cities. For details, check out the website below.
Unfortunately, when I was in Zagreb in February of 2004, the building was under construction, so I wasn't able to appreciate its architecture.
The main station, called Glavni kolodvor in Croatian, is located in the city center, only 10 min on foot from the Jelacic Square (2 stops by tram). The building is currently under reconstruction to last probably another year since the works are done phase by phase, allowing passengers to use all the services.
Croatian Railways finally have decent web page (http://www.hznet.hr/hr/), at the moment available only in Croatian, but the search engine for international connections is in English too (http://www.hznet.hr/medunarodni.htm).
I took a train Budapest-Zagreb. The trip itself takes about 6 hours.
The problem was that the cars were not clearly signed, at least for non Hungarian speaker :)
I hardly found a car going to Zagreb.
But I can't live without adventures... At the border, when I remained alone in my compartment, suddenly a controller came asking "Zagreb?" I said "yes". He said "Only 3 first cars go to Zagreb"... I don't know why maybe smth happened but my car, which was supposed to go to Zagreb, had to be detached from the train. I had to almost run with my lugguage to reach the 1st 3 cars. Luckily, I'm light packer and survived this "ruh" :)
Ticket price is about 23 €.