Leuven (French: Louvain) is the capital city of the province Vlaams-Brabant in Belgium at about 30km east of Brussels. It is mainly a calm administrative and university city with the Katholieke Universiteit Leuven which includes some magnificent historic buildings and cityscape.
West towards Brussels
Just walk on the ring of Leuven to the Tervuursevest and hitch along the Koning Boudewijnlaan. You will see many cars parked along the road, so you can start to hitch from there.
The E40 is passing at quite a distance on the southern side of the city, but there is a service station which can be a good spot to hitch a quick ride east towards Liege and Germany or west towards Brussels or Gent. The service station direction west is also the last one before the ring of Brussels.
To reach the service station from Leuven: Take bus #395 direction Overijse-Groenendal and go out at stop Rotspoelstraat. Alternatively try the buses #7-8-9 in direction Bertem and get out at Egenhoven and then walk down the St-Jansbergsesteenweg.
Another option, if you are already in the Eastern Part of the city (such as Bierbeek or Kessel-lo), is to walk to the junction of the N25 (Tiensesteenweg - Meerdalboslaan) which leads to the E40 at Exit 23. You can either try to hitch a ride at the junction or simply walk the 2-3km along the Expressweg to the E40 itself and hitch on the On-Ramp (which is having a large shoulder).
North towards Mechelen
To hitch from Leuven in direction North, you simply have to walk out of the city to the Mechelsesteenweg. The best would be to walk a bit further out of town, passing the viaduct of the Ring of Leuven (Singel) and then a bit further passed the E314 junction. From there you can hitch both the traffic coming from Leuven and from the motorway. There is a petrol station nearby, where you could possibly ask or at least where cars can pull over. Once you reached that spot it is pretty useless to walk further to Herent as the road forms a by-pass around the hamlet, but do not refuse rides going to the neighborhood of Haacht as it is easy to hitch further from there as well from the huge roundabouts.
You can also possibly try to reach the E19 by changing at the junction with the N21 (Haacht), which can lead you also to the neighbourhood of the Airport or the N267 (Schiplaken)
If you happen to pass around Leuven by the E314, you can simply ask to be dropped at any of the town or its suburb's exit (Exit 16 - 17 or 18) and walk into downtown.
Although if you are approaching Leuven through the E40, you might have to be dropped at the Leuven Services (Shell) and walk toward the local road into town, which is still quite a distance. Alternatively, you might get dropped at the exit 23 (Haasrode) and try to hitch along the local road into town, or walk the 4 remaining km.