Helen,I do lots of different things--depending on what kind of song it is, how well I know it, etc. I mostly play for my own amusement these days, and when I know the melody to a song, I will often just pick out the melody and throw in which ever adjecent notes harmonize well--If it is a pop song or a standard, I usually just play four note chords up and down the neck, using whatever inversion has the melody note at the top--folk tunes(which often have simple chords, but harder to play melodies) I often finger pick in the key of G, and then use my own taste to drop in either the basic chord or a minor or something to add a bit of color--
When it is a tune that I don't know by heart, I often get the sheet music and play it through, correct the chords and change the key, then through in my favorite substitutions--lately, I've tended toward reducing a song to as few chords as possible(somewhere, I mentioned playing all of Blue Moon" with one chord) but using either a quirky chord pattern or a peculiar bass figure--I can assure you that there is no computer program than will come up the same stuff that I do--