Since I can't edit answers, I'll post my own, but this builds on what others have written.
When you're at a relatively beginner level (as I am!), you're not gonna be whipping out amazing solos or harmonies. Go for the basics - pick a chord progression (the classic I-IV-V never hurts), and just both strum or pick along to it. Hopefully you can fall into a standard rhythm. As HÃ¥vard mentioned, have fun and communicate.
Once you're both playing the same chord progression together and not messing up, have one of the players try a "solo". Don't worry about it being amazing - I can't remember where I heard this advice, but playing on a single string can sound amazing, especially with another person backing you up with the chords. If you know chords and scales, you should be able to play along the scale that matches the chords you're playing, and that's often enough. Don't worry about messing up a note here and there, just keep playing, and when your solo time is done, go back to the chords and let the other person have a go.
After a while, switch up the chords you've chosen.
Lastly, don't be afraid to sing along, even if it's just nonsense, or lyrics from another song, or lyrics about how you can't think of any new lyrics. Some of my greatest laughs while jamming have been over lyrics like "I have no idea what to say next, so I'll just ohhh oh oh ohhhh oh ohhh"!