Practice, experiment, and even if you can't sew straight don't give it up.
There are many little gadgets on the market to help you keep a consistent straight line, for example magnets, pads, tape, sewing machine feet, etc.
And start with something SMALL.
When you're comfortable, advance to making a pattern, but begin with your basic squares (any size) then continue to experiment.
Your experiments, practice, and patience will mold you to your expectations.
Good Luck!