Kraton or keraton is simply a Javanese word meaning palace. You can find a few kratons all over the island, most notably in Yogyakarta, Solo (Surakarta) and Cirebon. A palace not on Java or its neighbour Madura, will be called with its Indonesian name, istana.
The Yogyakarta Kraton or the Keraton Ngayogyakarta Hadiningrat as it is called officially, situated right in the centre of the city, is the residence to the Yogyakarta sultan. The kraton is a 1km2 square area, completely surrounded by whitewashed walls. Main tourist attraction behind the walls is the sultan's residence itself. To enter the residence, you have to pay a small fee (around €2), a guide inclusive. He will show you this 18th-century palace, nicely restored. The rooms are spacious and it is remarkably cool inside. A few times a day a gamelan (Indonesian orchestra) plays, a wayang kulit (shadow puppetry) performance or Indonesian dance show is held here. Your guide knows the times. When you are here for half a day (the palace is opened until 3PM), you should be able to check them all out.
Behind the walls lived the sultan's servants, making it a city within the city, complete with houses, decorated according to the servant's status, an old mosque (Masjid Gede Kauman) just outside the walls and two "sultan grounds", large squares previously used by the army as exercising grounds, one in the north (alun-alun utara) and one in the south (alun-alun seletan) of the Kraton. Inside you can also find the sultan's batik workshop, but the batik is rather pricey here. Another famous building is located in the southwest of the Kraton, namely the partly ruined Taman Sari (also known by its Dutch name waterkasteel or water castle). This used to be the sultan's pleasure garden, part of which used to house his harem.
To get to the Kraton just walk south along Yogyakarta's main tourist avenue, Jalan Malioboro, until you reach the main entrance gate of the Kraton. You can enter the Kraton through the gate for free, but vehicles are not allowed in, not even bicycles. Just beyond the gate is alun-alun utara, with the palace to the south of it. Inside the walls, the only way to get around is by foot.
The best thing to do is pay a visit to the palace during the morning, taking in a few performances inside. For lunch, you can buy snacks on the food stalls set up on the alun-alun utara. In the afternoon walk to the south of the kraton towards the Taman Sari. Normally this will be closed already, because it's open only in the morning as well. You could visit it the next day, but apparently it is not so interesting inside, we gave it a miss. Anyway, the ruined gate is already a nice sight. Walk back to the northern sultan's ground. The buildings around it will be nicely lit during the evening, so be sure to check it out.