Sewing machine: how to sew a straight line left ⇆ right (instead of front ⇆ back)?
You are describing the technique used for "free motion quilting." On some sewing machines, you can lower the feed dogs instead of covering them. Your machine may come with a "darning foot" or a "free motion quilting" foot which should be used when doing this type of stitching to hold the fabric down while the needle is in the fabric, then lifts when the needle comes up so you can move the fabric.