Dirt bikes come in a few different flavors. At one end of the spectrum are the "MX" bikes, which are basically built for racing and won't have any frills or extras like kickstands or headlights. At the other end of the of the spectrum are the "off road" models which are much less expensive models and intended for the casual rider. Then there are some models that are in between.
The MX bikes will have a high performance engine. The higher compression ratio dictates the use of premium gasoline. They tend to be a bit more finicky and are not built with a lot of endurance margin. As a result the "top end" needs to be rebuilt on a regular basis. This is true of both two strokes and four strokes although the two strokes are a lot easier and cheaper to rebuild.
The off road models will typically have a de-tuned four stroke engine. The lower compression ratio is happy with just about any junk you put in the tank. They run cooler and everything is built a little heavier so they can survive being ignored for longer periods of time. They will also have a lower seat height, favorable for shorter people, and the suspension travel will typically be much less than the MX bikes. A heavier bike with less suspension means that they will suck on the jumps.
A MX bike is very reliable IF you maintain it and don't abuse it. A two stroke is easier to maintain because there are no valves that need adjustment and top end rebuilds are much easier. They have the power to destroy themselves if you push them too hard, however.
As for track vs trail: My advice would be opposite that of your friend. Four strokes are much more forgiving. They won't rev up as high but if you find yourself climbing a hill in the wrong gear a four stroke will lug along and provide at least some power. A two stroke, on the other hand, will just scream IF you are in the "power band" (aka "on the pipe") but when the RPM drops too low they can fall flat on their face. Two strokes are great if you are good at shifting and slipping the clutch when necessary, but four strokes are much better for cruising.
Another issue with two strokes is that they reallly do not like to "putt". If you are riding slow and not keeping the engine temperatures up in an appropriate range the two stroke oil can accumulate and foul the spark plug. Four strokes can be ridden slow all day long and not have a problem.
My suggestion is that you fill out the form that is in the "sticky" post at the top of this forum and with that information we can guide you better.
Rod