Another technique used is, particularly for longer sets, is to have one strong narrative spine, a central idea or story (which doesn't have to be particularly clever in itself) and then hang jokes/bits off it on tangents, almost as if you were suddenly reminded of them as you went along. Then go back to the original thread.
E.g. a stupid example.
So I was going to the shop to get some milk, you know the corner shop just past the chicken hut - do a bit about chickens - and on the way I met Mrs Smith who is a pigeon breeder - do a bit about pigeon breeders - and then I nearly fell down an open manhole - there are no possible jokes about manholes, move on... - then I got to the shop and it was out of milk etc.
That's a not an actually funny example, so you can see the stitching but I hope it gives you an idea of the structure. Watch some of you favourite pro comics, I'll bet you find a lot of them use it.
The advantage of this is you can just throw a little joke in as an aside or go off on a five minute anecdote and it still all feels like one "thing" because of the main thread.
EDIT: And Soots tip is also very good (and can be used together with this).