Technically, you can escape Kerbin's gravity at any height, as long as you're going fast enough.
To orbit the planet at any given altitude, you only need to be travelling at the corresponding horizontal speed, as shown in the table below. The only reason that you can't orbit the planet consistently at low altitudes is that it's difficult to maintain your orbital velocity in the presence of atmospheric drag.
For example, to enter an orbit at 100km above the surface, you need a horizontal speed of 2245.8 meters per second.
Kerbin's atmosphere tapers off at approximately 68-70 km above the surface. Any orbit below this altitude will require corrections due to atmospheric drag, or else your ship will begin losing orbital speed and eventually deorbit. You can also do this intentionally if you want to deorbit your spacecraft - reduce your speed enough to drop below the minimum horizontal speed given in the table, and your spaceship will begin to descend.
I've snipped portions of this table to save space. The full thing can be found on the Kerbal Space Program Wiki:
Altitude (m) Horizontal Speed (m/s) Orbital Period (min)
35000 2357.9 28.20
40000 2348.7 28.54
45000 2339.6 28.87
50000 2330.6 29.21
55000 2321.7 29.54
60000 2312.8 29.88
65000 2304.1 30.22
70000 2295.5 30.56
75000 2287.0 30.91
80000 2278.6 31.25
85000 2270.3 31.60
90000 2262.0 31.94
95000 2253.9 32.29
100000 2245.8 32.64
110000 2229.9 33.34
120000 2214.4 34.05
130000 2199.2 34.76
140000 2184.3 35.48
150000 2169.6 36.20
160000 2155.3 36.93
170000 2141.3 37.66
180000 2127.5 38.39
190000 2114.0 39.13
200000 2100.7 39.88
300000 1980.6 47.59
400000 1879.0 55.73
500000 1791.5 64.30
600000 1715.3 73.26
700000 1648.0 82.61
800000 1588.0 92.32
900000 1534.2 102.39
1000000 1485.5 112.79
2,868,378 1008.9 6 hours
8,140,000 635.4 24 hours