The chassis (bare steel frame made out of tubing that everything attaches to) that the teams use are all built to the same specs and are checked by NASCAR with a computer. Then specific areas are electronically tagged. The chassis have serial numbers and the electronic tags are registered to that serial number.
There is no way to remove the tags without destroying them. NASCAR checks for the correct tags to be on the chassis. If the chassis needs to have parts replaced, NASCAR must be notified and after the repair the chassis must be reinspected by NASCAR at their R&D center.
New tags are applied by NASCAR and are added to the chassis serial number.
The bodys have different looks to get them more like the cars sold by the respected manufacture but all have been tested to have the same amount of drag and down force to keep one brand from having an advantage.
In the last decade, the bodys were all pretty much the same except for decals. Take the decals and paint off, you couldn't tell any of them apart. Not that way now.
The engines are built by teams with approved parts from NASCAR however, alot of teams lease race engines from major teams. Hendrick, ECR (Earnhardt/Childress engine shop), Roush/Yates engines and TRD are the major engine suppliers. Teams lease a engine and that comes with a engine tuner as well. Around $60-$80k per race.
The major teams also rent out their engineering teams to smaller teams as well.
With NASCAR, it's not what the rule book says, it's what it doesn't say.
HERE is a pretty good write up on Jeff Gordons T-REX car.