How does code typed in Arduino IDE runs on a nodemcu?
how does code typed in Arduino IDE runs on Nodemcu


The IDE runs the compiler which turns the C into assembly and then machine code.  That is then uploaded to the ESP8266.


  what firmware is present on the nodemcu.


The code that you just wrote and uploaded.


  i want my esp8266-01 module to work with a Lilypad Arduino .So this is the way I want it to work Lilypad Ardiuno has acquires some data using a sensor it wants the post this data to a server on internet.So to do the job it uses a ESP8266-01.So will the configuration work?


Sure, if you program it to do that.  Two choices:


Use the AT firmware on the ESP-01 (installed by default)
Write custom firmware (as above) for the ESP-01 to do what you want.