You must start with one side of your wood being absolutely flat, as is the case with a new piece of 1X or 2X you purchase. The best way to ensure flatness is to run it over your jointer....but assuming you don't have this, you can draw an absolutely straight line on the wood near one edge, using a straight edge like a framing square, then cut and plane right up to your pencil line, then check with your straight edge. Once you have it, you can then set up your new table saw's rip fence to the desired width and run you newly squared edge against the fence and make your first cut parallel to the new straight edge. Then, using your saw's sliding miter gauge, put one of your now true edges against the miter gauge (set at 0 degrees of tilt) and cut one end of the wood....and check for squareness with your framer's square. Then turn around and cut the opposing end to the desired dimension. And there you have it....a square piece of wood.
Congrats on getting your first table saw. It'll be a lot of fun to use!