Are you talking about trying to clean a generic filter, or a high flow filter like K&N?
You can't clean a generic filter, all you can do for those is tap the dirt out. To clean K&N filters you need to buy their cleaning kit and it has directions on how to do it inside. They're like $12 or so at most any auto parts store, not too hard to find. but basically you...
-tap out the loose dirt
-then rinse out the finer dirt particles by rinsing the filter under a sink faucet from the inside out, or you'll be pushing the dirt further into the filter. You can't use a hose to do this, it too high pressure and it will ruin the filter.
-then you soak the filter with the special liquid soap that in the filter cleaning kit.
-let that sit for a few minutes, then rinse out the filter again
-then you coat the filter with the special filter oil that's also included in the kit.
-reinstall, you're done.