Can I use an ESP8266 as a replacement for an original Arduino?
Yes, No and Maybe is the best answer :)

Assuming that you want to replace a Arduino Uno board with an ESP8266 based board.  Your best choice at the moment would be a Wemos D1.  It has the same form factor as the UNO, but it has less pins, 9 digital and 1 analog.

If you are not bothered about the form factor, you could also try a Node-LUA, or a Wemos D1 Mini.  If you have steady hands you could try just using the heart of these three boards directly, which is usually called an ESP8266-12E, but it has 1mm pitch and no voltage regulation.

There are a lot of sites around that have tutorials on using ESPs.  They are mostly interchangeable with Arduino boards from a software perspective, they have more memory and a faster clock speed.

The biggest difference between an Arduino based board and an ESP board is most Arduino use 5v and most ESP based boards use 3.3v.  Make sure you read the datasheet before you hook up you sensors.

There is an ESP-32 as well.  This is not interchangeable with an Arduino Uno at the moment.