What is the thing in the middle of the turbofan?
egid is right. It is called spinner. 

The spinner basically covers the part of the hub where the compressor blades are attached and reduces drag.



Source: b737.org.uk

It also serves other purposes:


Diverting the airflow efficiently in the center of the engine so that the airflow is smooth over the compressor blade hub





More importantly, the spinner serves to divert the rain and (more importantly) hail impinging on it towards the bypass fan and away from the 'core' of the engine, reducing chances of engine flameout.


The second point an important design parameter for the spinner. According to AGARD-AR-332, Recommended Practices for the Assessment of the Effects of
Atmospheric Water Ingestion on the Performance and Operability of Gas Turbine Engines,


  An effective way to remove a sizable amount
  of hail from the core is to optimize the spinner shape
  to deflect hail upon impact directly towards the fan
  duct.


The spinner of the CFM56 engine was modified in response to the engine flameout experienced in Garuda Indonesia Flight 421. The shape was changed into a conelliptical profile.