You would need to file a motion with the court to allow you to leave the country. Your chances of success will be far better if you have an attorney handle this; the motion should include documentation of the reason for your trip and directions for you to report to the probation department when you return.
For instance, I recently obtained permission for a client to study in Central America for a semester.
Depending on the offense, the country where you plan to travel might not allow you to enter.
If you just decide to leave the country, there is a possibility you will be detained at the airport when you try to leave or when you return. If your probation officer finds out you left the country without permission, you could be found in violation and sentenced to jail or prison for the maximum term for the offense that got you on probation in the first place.
Please understand that this is a general discussion of legal principles by a California lawyer and does not create an attorney/client relationship. It's impossible to give detailed, accurate advice based on a few sentences on a website (and you shouldn't provide too much specific information about your legal matter on a public forum like this site, anyway). You should always seek advice from an attorney licensed in your jurisdiction who can give you an informed opinion after reviewing all of the relevant information.
Yes, only the judge can give you permission to leave the state. The decision will likely be based on your performance on probation, location to which you wish to travel, reason for going there, and duration of stay. If you go without permission, it is a violation of your probation, and you could be sentenced to the maximum that the offense carries.