The sheet bend is the "proper" way to secure two ropes together. Although a square knot will do the job, the sheet bend eliminates any slip that a square knot will inherently have, and works better with unequal diameter ropes.
Step 1: Prepare to Tie
You will want two different pieces of rope, although one piece will technically work if you tie the ends together. You can even use two different sizes of rope.
Step 2: Tie the Sheet Bend
Place each rope on one side of you. Make a loop with the end of the rope to the left of you. Take then end of the rope to the right of you and bring it through the loop, then above and back around the two strands that for the loop. When you pull it out from the bottom, pass it underneath itself right after it emerges through the loop.
Step 3: Afterword
Now that you know the sheet bend, you can look into other variations. My favorite is the double sheet bend, in which you take the second piece of rope, and loop it around one more time. This can be useful if the ropes are significantly different in size.