On your descent, assuming you don't have an overhang, you simply place your heels against the wall, feet about shoulder width apart and lean back until your legs are horizontal, holding the rope above the knot and walk or bounce gently as your belaying partner lowers you.
The only things that will cause a swing are- climbing a pitch adjacent to the one your rope is for (as Don says) holding on to the wall on your descent
outdoors.stackexchange.com/users/66/Rory Alsop
Top-roping or lead-climbing?
I haven't seen this happen in top-roping except when using the wrong rope - that is, for the rope next to the route i'm climbing.
When you top out you should be near the pulley.
If you're way off to the side, then, yeah, you should expect some swinging.
If you're 5 feet from the pulley, you should expect to swing 5 feet each way until the swinging dampens.
Spinning
you should be able to control by leaning back and keeping both feet on the wall, which works unless you're passing an overhang.
outdoors.stackexchange.com/users/1942/Don Branson
For lowering on top-rope: Grab a quickdraw and attach one end to your belay loop and the other end to the belayer end of the rope.
For lowering on lead: Same idea, but you will have to unclip the quickdraws on the wall as you go down essentially cleaning the route before getting stuck on the quickdraw attached to your belay loop
outdoors.stackexchange.com/users/3752/SplitterC
As others have mentioned if you're within reach of the wall then keep your feet on the wall and walk down backwards (keep your butt level with your feet).
As for an overhang, provide you're top-roping, the easiest thing to do is to have your belaying partner stop you (don't descend until your stable), then reach out and grab the section of rope between your belay partner and the anchor and use it to stabilize yourself.
Once you're stable let go of it and tell your belay partner to lower you (be sure to communicate when you want to stop and when you want to go).
Keep in mind
it's pretty much always best to get yourself under control while you're as high off the ground as possible.
You're less likely to collide with a wall, other climbers, or other people on the ground.
outdoors.stackexchange.com/users/2040/STW
I'm presuming your on an overhanging wall here as if you can touch the wall you should walk down preventing this issue.
It's very common to twist and spin a little when being lowered off overhanging terrain
so don't worry about it!
Keep calm and relax.
If you tense up and try and correct any spining or swinging your likely only going to make things worse.
Do not grab the wall!
You may well hurt yourself.
Parry it away with your hands and feet but don't hold onto a hold.
You could down climb (but this is likely going to become very tiresome very quickly)
I tend to let my arms hang loose by the side of my body and lean forwards slightly.
If I spin or swing (providing I'm not going to hit anything)
I let it happen and just stay loose.
If this becomes too violent, your belayer should slow down or stop, let the swing finish then continue.
The belayer should do this without you having to shout and tell them if they are paying the correct attention.
If your belayer doesn't do this consider talking to them (ideally when you get down "next time can you not do that, etc"), they may not see it as an issue, but if you do they should adjust their technique according to what you want
(climber is always in charge).
outdoors.stackexchange.com/users/None/
I recently started indoor rock climbing at a local spot.  I got to the top and (after appropriate communication) my partner started to belay me down.  I instantly starting swinging and spinning pretty wildly, more than 10' arcs.  I was able to catch the wall, but every time I let go the same thing would happen.  I didn't see anyone else having this problem.   How does one descend in a relatively vertical fashion without swinging like a pendulum?  (edit:  Top-roping)
How to avoid pendulum descent when belaying?
outdoors.stackexchange.com
<climbing><belaying><top-roping>
outdoors.stackexchange.com/questions/3482
outdoors.stackexchange.com/users/127/Russell Steen
On your descent, assuming you don't have an overhang, you simply place your heels against the wall, feet about shoulder width apart and lean back until your legs are horizontal, holding the rope above the knot and walk or bounce gently as your belaying partner lowers you.   For lowering on top-rope: Grab a quickdraw and attach one end to your belay loop and the other end to the belayer end of the rope.   For lowering on lead: Same idea, but you will have to unclip the quickdraws on the wall as you go down essentially cleaning the route before getting stuck on the quickdraw attached to your belay loop. Lean back and make good use of your belay loop.
Lean back and make good use of your belay loop.