How far ahead of your flight time depends on your airport and traffic getting to the airport; some smaller airports, it's fine to be there one hour before your flight whereas a really busy, spread out airport like Chicago O'Hare, you may want to be there earlier. Also, you don't have to be as early for domestic flights as international flights where you have to go through customs. Either way, you still need to go through security screening and you can bring almost any type of food except certain agricultural products like citrus fruits which have the possibility of having fruit-borne larva that can decimate fruit industries in other states. However, you can't bring foods from outside the airport that are largely liquid like soup or sodas unless you bought it at the airport. This means a large jar of jam, hot sauce, or gravy would not be allowed.
The 3.4 oz. liquid and gel limit is this: in your carry on luggage, you can only bring containers of no more than 3.4 oz. size of shampoo, conditioner, hand lotion, liquid mascara, and other toiletries; these carry on liquids and gels must all fit into a single quart-size plastic ziptop bag that you have to take out of your bags at TSA screening. If you brought a 16 oz. bottle of water from outside the airport and tried to take it through security screening for example, the agents would throw it away because it is more than 3.4 oz. allowable size for carry on.
You can bring laptops, tablets, smartphones, portable video games, mp3 players, dvd players on the plane. You would have to take laptops out at security screening and put it into a tray for x-ray screening and once on the plane electronics would have to be powered off at takeoff and landing but can be used once the plane reaches cruising altitude.
You can now check into your flight online 24 hours before your flight with your name and confirmation code you receive when you have bought a ticket; this will allow you to print out a boarding pass which you will need along with state-issued ID to get through TSA screening plus it is what gets you onto the plane. Many airlines also accept an electronic version of the boarding pass that you can bring up on smartphones.
Many useful bits of info on TSA website at http://www.tsa.gov including carry on liquids info, food info, prohibited items, ID info, etc.