Magnetic materials have a plethora of applications ranging from informatics to energy harvesting and conversion. However, such functionalities are limited by the magnetic ordering temperature. In this work, we performed machine learning on the magnetic ground state and the Curie temperature (TC), using generic chemical and crystal structural descriptors. Based on a database of 2805 known intermetallic compounds, a random forest model is trained to classify ferromagnetic and antiferromagnetic compounds and to do regression on the TC for the ferromagnets. The resulting accuracy is about 86% for classification and 92% for regression (with a mean absolute error of 58K). Composition based features are sufficient for both classification and regression, whereas structural descriptors improve the performance. Finally, we predict the magnetic ordering and TC for all the intermetallic magnetic materials in the Materials Project. Our work paves the way to accelerate the development of magnetic materials for technological applications.