I purchased 2 hanging lights from Ikea and they are wired with plugs. I was wondering if I could run the cords with the plugs through the attic and down the wall to the plug. Will the wire get to hot in the summer and cause a fire?
Short answer: No, you can't run flexible cord through the ceiling/walls.
There are many problems with this, the main being that it's against code, relevant section:
Essentially, you can use flexible cord from the junction box to the light itself (NEC 400.7, ref Pendants), but not past that point where it becomes part of the "fixed wiring of a structure". The main reason (as I understand) for this is that flexible cord is more subject to physical damage (which can then lead to overheating).
You have a few options.
Suspend the lights
You can suspend the lamp from the ceiling using hooks or some other physical means, so long as the flexible cord is exposed (eg: no holes through drywall).
Use surface-mount conduit
There are various surface-mount conduits (or raceways) products that will allow you to partially conceal the wires. Some products can be painted.
Add a junction box
Bottom line, if you want the wire totally concealed, you need a junction box. This is a non-trivial task, and almost certainly involves punching holes in the drywall (which you'll have to patch afterwards) to be able to fish wires. You'd use solid-core wire to comply with code to run to the junction box (typically 14/2 romex).
How to actually do this warrants an entirely new question.
Anyway, once you have a junction box in the ceiling, the best thing is to get a type of lamp designed to be hard-wired.
I looked around for a retrofit box cover to use the existing lights as hardwired, but can't find one. I'm not sure such a thing exists, but if it does, you could use that to use the existing lights as hardwired lights. Even in this case, the wire to the junction box has to meet code (eg, you can't use flexible cord), although it would be fine, as per NEC 400.7(1) to use flexible cord from the junction to the light fixture itself.