Hi Sally - everyone is correct - it is a button hole maker. The bottom should open and the cams snap into the base. Some where there should be a shank attachment on it (generally right in the front - the bottom of the photo). You unscrewed the presser foot and its attachment and replaced it with this unit. The needle stitched in the sliding unit at the bottom. Those lines are there to help with placement on the garment The top knob helps determine where in the buttonhole starts.
The slider on the left controlled how wide the zigzag was while the cam controlled the back and forward movement. They made great buttonholes. Remember to drop the feed dogs.