No, it only backs up to external drive.
iCloud offers backing up that is automatic, however, is even slower than TIme Machine.
Both operate in automatic when on. Meaning you could be needing valuable processing time, and backing up your data at the same time. I find it is useful to put Time Machine in the menubar and turn it off from System Preferences, and only activated it via the menubar.
The cloud except for fiberoptic, large corporate networks, and school networks is inherently much slower sending data to the server on the cloud than bringing it down. Many are as many as 50-100 times slower. Add more devices on your WiFi, even slower. So if you want to use the cloud for backup, consider how much information is vitally important to you for doing so.
Apple's July 22, 2011 and later computers all have operating systems that can restore from the internet.
See this backup FAQ for further detail.s