The best solution will depend a lot on your particular tent and general set-up but here are a few pointers.
Try and keep kit in your tent neat and to a minimum. If you are trekking you probably won't have too much kit anyway. If you are car camping try and keep as much stuff in you car as possible (its nice and dry in there).
Keeping your kit tidy and backed away is generally good practise (I'm terrible at this). In particular, I find if you have a big pile of stuff it is easy to just push to one side/into a corner where it will touch the walls and get wet. If you have one or two bags they are easier to place somewhere sensible.
Generally, I keep most of my kit in the inner tent where I sleep. I have a small two man so if it is just me I will lay my bag next to me, and try and keep it off the walls. For larger tents you can also put your bag at your feet. I've also seen people use their bag as a pillow which seems quite good, especially if space is tight.
Most larger tents will have a sort of porch area and even small tents tend to have some extra space at the door. You can leave your kit here. If it is a relatively small space lean your kit into the inner so as to avoid the outer. Also if this area doesn't have an groundsheet you kit may get wet from the ground.
Finally, as Liam pointed out dry bags are good. If its raining you'll probably get a lot of damp kit anyway so they can help keep your dry stuff separate.