Can I suggest a great book - The Zone system for astrophotography (Rod Wodaski). He walks you right through all the tweaking you can do to images (preferably RAW shots). Basically its aimed at Photoshop CS or CS2 (althought Maxim DL users could benefit too).
If you have applied levels to shift the black point of your shot correctly, and then run (non-linear) curves to augment the dim and mid zones of your shot correctly - then run iterations of these function until your signal to noise ratios are optimal its time to filter (e.g. Gaussian Blur, Unsharp Masking). The filters can do useful things like soften the transition from bright to mid or mid to dim zone. Basically signal enhancement rather effectively elevates (and brightens) data in the dim to mid zones, but if done too aggressively can reveal obivious transition points that look artificial as they don't happen like that in nature, so to our eyes they look tampered. Filters go a long way to addressing this. As Mike said its done last in your processing. If you have already mastered levelling and curves, its still worth a read to gain insights into filters available and how to use them!