Depends on the engine, but in most cases the slide valve is a machined fit, and connected on a rod which protrudes past the valve, and is supported on the other side through an bearing. The valve rod usually has a screw fitting around the valve so that a gland can adjust the valve forward or backwards, to adjust the opening of the valve, (or the valve timing as it were).
Think of it as a threaded rod with the outer portions of thread removed, leaving the rod free to move forward and backward through a bearing, (machined hole), the valve sits over the threaded portion of the rod, and is adjusted by nuts to the front and back of the valve.
The space between the valve and the top of the valve chest, is for exhaust steam, which is at lower pressure than the steam coming into the cylinder through the middle of the three holes under the valve. So steam pressure can't be relied upon to form a seal. The valve face, and it's seat over the valve needs to be a polished finish, with as many machining marks removed as possible, this is achieved by rubbing on a flat surface (piece of glass) on fine emery paper and light oil.
Hope this helps, I have an example of an external valve arrangement, which relies on spring pressure to hold the valve seated. A video is on my YouTube channel. If your interested I'll post a link here, though you'll have to forgive the engine as the eccentric has worn to the point of useless!