We all know how annoying some kids can be when they bring a friend over and they start to get bored, start rough housing and be troublesome. Here are some ideas I have to keep your child and their friend happy and having fun without being stuck on their DS's the whole day or being troublesome.
Before the friend arrives, you and your child/sibling get out a whole bunch of toys and games and set them up ready to go. You might get a box of pencils and crayons and some paper and set that up on a small table in the lounge room, get out a few board games and put them on the kitchen table, bring out your kids box of cars/dolls/army figures, anything and set it up kind of like a day care centre. For the little ones, you could ever set down a blanket and put toys on it for them to play with.
Encourage the kids to choose what they want to do themselves, rather than you saying every half an hour, "Why don't you do some drawing now?" or "Why don't you play with the soccer ball?". You can offer some ideas if they seem to be getting bored but mainly get them to choose what activities.
Always keep an eye on them to make sure they're not doing anything wrong like about to tip a whole heap of dirt on the cat, or making crank calls. Trust me, it could happen! I once accidentally sprung my brother and his friend calling up the pizza parlour because they found the number on the magnet on the fridge.
If it's a rainy day, why not suggest to them to get some blankets and set up a movie for them. Get them to both decide and agree on a film.
Join in with them when you can; if they're younger they'll find it fun, if they're aged around 8 and beyond they might think its lame and uncool for their mum/dad or older sibling to play with them and their friend. Respect their wishes but also volunteer and start doing something with them, such as drawing, colouring, playing with puppets, or a board game. Kids love it when older people join in on games with them, even just 1 or 2 games will keep them satisfied.
If you notice they are sitting for ages playing PlayStation or Nintendo DS, simply unplug it. Encourage outside play or different activities which don't involve screens, and something that'll make them think.
Here are some fun things my siblings like to do when they have friends over
Bike riding (or roller skating, scooter or skateboard) out in the street (always with supervision)
Going to the park
Cooking (with supervision)
Having picnics outdoors
Playing with the dog
Playing games on the trampoline
All are great fun activities than can be done with their friends and with supervision from you.