In principle Lockheed Martin, Boeing, Orbital-ATK, and SpaceX are all commercial companies that build space related products. (Boeing and Lockheed Martin of course build lots of other stuff, airplanes, fighter jets, etc).
The difference in the context of space is how they have contracted for products and how they get paid.
The Space Shuttle was built mostly by Rockwell International (who was bought by someone I forget), with the SRBs made by ATK and so on. They did not build it, and sell services to NASA. They worked with NASA who developed the specifications, built it to NASA requirements, and operated it, paid by NASA.
The same basic model is true for SLS.
Atlas V and Delta 4 as perhaps slightly different in that the companies developed the boosters on their own, with some large amounts of funding thrown in by NASA and the Defense Department. Originally Boeing and Lockheed Martin were competing for the contracts, but then they merged into the United Launch Alliance for both boosters. NASA, DoD, and other customers then pay for launches as needed. Except that they also pay a yearly 'maintenence' fee on the order of a billion dollars to keep the service available, irrespective of launch orders.
The core difference to SpaceX and Orbital-ATK in the context of Commercial Space is that NASA said, we are offering a contract for 20,000 Kilos of cargo to the ISS. It needs to berth to a CBM port, and meet ISS safety standards, etc. They then funded a development program of a couple of hundred million dollars (Expanded a few times). NASA said, lets see what vehicles you come up with, your choice of launchers, and vehicle design.
That ended with a contract for 20,000 Kilos of cargo over 4-5 years to each of Orbital-ATK and SpaceX.
Next NASA said, lets do the same for manned flights. We will not hand you a design and say build it, rather you build a manned vehicle that meets our standards and we will buy flights. Again they have funded a development program to help get it going and the first few flights.
Then they will start buying flights, hopefully based on costs (but I doubt it) from Boeing (CST-100 vehicle) and SpaceX (Dragon V2).
The core difference is "Old Space" was cost plus, where they made more money the more it cost, so incentives to do it efficiently were not there. "New Space" is getting paid a fixed price, and they need to be able to deliver for less than that price to make a profit, so they are directly incentivized to be more efficient.
Another way of looking at it might be that NASA owns the Space Shuttles and Orion vehicles. SpaceX owns the Dragons, NASA just uses them for delivery services.