Any trip to Bali over land will require a ferry crossing.
The ferry crossing from Bali is included in the services offered by numerous bus companies, many of which travel overnight to Java. It's advisable to buy your ticket at least one day in advance from a travel agent or at the terminals in Denpasar (Ubang) or Mengwi. Note that flying can be almost as cheap as the bus.
Fares vary between operators; it's worth paying extra for a decent seat (all have air-con). Destinations include Yogyakarta (350,000Rp, 20 hours) and Jakarta (500,000Rp, 24 hours). You can also get buses from Singaraja in north Bali.
When travelling to/from south Bali, you can save time using this terminal rather than the one in Denpasar. Metered taxis are available and fares should be 150,000Rp to 200,000Rp.
Bali doesn't have trains but the State Railway Company does sell tickets through travel agents in Denpasar. From here buses leave for eastern Java where they link with trains at Banyuwangi for Surabaya, Yogyakarta and Jakarta, among other destinations. Fares and times are comparable to the bus, but the air-conditioned trains are more comfortable, even in economy class. Note: Google Translate works well on the website.