I think we should identify which branch we're talking about because while much of the advice applies to all, it gets confusing and some of the stuff applies more to individual branches. Marines, for example, are way more prone to being overly cocky just out of basic. When you get out of boot camp you are the lowest life form on earth that can still be called "Marine" so be aware of that.
The best piece of advice my old Platoon Sgt ever gave to me was that in the USMC you get out of it what you put into it. If you spend your liberty and leave drinking away your paycheck in bars and buying stereos, you'll get out with a nice stereo and nothing to show for the last 4 years. But if you take advantage of the opportunities (tuition assistance, MCIs for promotion, cross training, GI Bill top-up fund, etc), you can be sitting pretty when you get out. I was able to secure a 6 figure income and buy a house less than 6 months after discharge...and i still have 60k to spend on graduate degrees. But that's because i worked my ass off during those 4 years. From the moment you step on the yellow footprints, start planning for your future. Whether or not you stay in, you'll benefit greatly by preparing yourself for the civilian world as soon as possible.
One other thing: Good first appearances and a stellar reputation will get you out of a world of sh!t. Max out your credentials whenever possible. Although double jeopardy exists, so does double improvement. That is, pretty much anything you do to improve yourself gets you double credit. You improve yourself and the USMC also thinks higher of you. You don't really get much extra credit in the civilian world for self improvement unrelated to your job. But in the USMC you are govt property and self improvement thereby implies govt improvement.
And if you screw up and get into trouble, they'll look at your records and consider your reputation. If you're running a 300 PFT with an expert rifle score, high pro/cons, crisp uniform, going to college, and a great reputation, they're MUCH more likely to let things slide. On the other hand, if you're one of those "bottom 10%"ers, prepare to get fvcked.