How to get from Bali to Jakarta by bus and ferry?
Go to Ubung bus terminal, catch a bus to Gilimanuk, cross by ferry to Banyuwangi (Ketapang), continue to Surabaya, take long-distance bus across Java to Jakarta. This will take at least 24 hours, much of it on bad roads with suicidal bus drivers hopped up on drugs. Most travel agencies can organize a through ticket for you, or you can try to find your own way - it's not particularly hard, but scammers will do their best to make you overpay.
A much better alternative is to fly. This covers the distance in an hour and half, is about the same price if you book in advance with a low-cost carrier like Air Asia, and is far more comfortable and safe.