Buffered I/O vs standard i/o

i see many solutions in codechef in c c++ using buffered i/o and other complex i/o methods. a simple 5 line code becomes a complex looking code of 2 page using buffers etc. but the running time is considerably affected.
my simple code in which i use scanf printf cin cout takes 2-5 seconds for running while these buffered i/o solutions run in about 0.13 seconds. how is that ???
please post a tutorial so that we can read it and understand it and may be use it in future …

i have referred to c and c++ …

//