This question has differing answers to it. Depending on which person you ask. This is what I consider to be mathematics. Mathematics is a subject which is concerned about coming to truth from the use of deduction alone, it is a rationalist constructed universe. It is not subject to empiricism whatsoever, it has no relation to the outside world, it is just the process of pure reasoning.
One can ask then how is mathematics different from what the rationalists did in philosophy? The difference is that mathematics uses formal reasoning and rigorous definitions. In philosophy the definitions are not formal, and the reasoning is not so binary, it is more fuzzy. Which is why pure reasoning has problems outside of mathematics. But within the scope of mathematics reasoning works perfectly. Hence this is why all mathematical theorems end up working and a lot of derived statements from rationalism either make no sense, too ambiguous, or just plain wrong. It was mathematics, in particular Euclid's Elements that inspired the rationalism approach to philosophy. However, the rationalists just do not have the same elegance and precision that the mathematicians always had. (This is not to suggest that one should not use the deductive approach outside of mathematics, only that it is not as clear and it is not foolproof as it is in mathematics).
Mathematics is therefore not a science. It is common confusion to refer to mathematics as a science but mathematics is fundamentally different from science. Science uses the inductive method of experiment to understand the universe. Mathematics does not use the inductive method and it is not necessarily applicable to the universe. It is certainly true that mathematics is the ultimate foundation for many sciences and without it science would not be possible but mathematics itself is not a science. Most mathematicians actually think of mathematics as a form of art. Mathematicians gain a lot of excitement and see beauty in mathematical theorems. It is an art form for them. In many cases a highly obsessive art form.
I divide mathematics into four categories, all of mathematics can fit into one of these (or a few) categories. I just want to mention that my classification of mathematics is entirely my own. However, I found it interesting that other people who classified mathematics classified it into three categories. Three of my categories match with what the other people classified mathematics, I just added a fourth category. I used to classify mathematics into three categories but it seemed to me that three is not enough. Mathematics can be classified as: geometry, analysis, algebra, and combinatorics. The standard classification of math is: geometry, analysis and algebra. I add combinatorics because I think it deserves it own category.
Combinatorics, put simply, is "counting without actually counting". Combinatorics is a category of mathematics that is concerned on determining all the possibilities without actually listing all the possibilities. For example, how many different Texas Hold'em hands are there? This question is not hard. We can simply list all possibilities involving two cards but such is a foolish method of solving a problem. There is a formula (called the "combinations formula" is you are interested to read about it) that gives the answer immediately. Thus, it is possible to determine the answer to this question without actually counting anything. Here is another kind of problem from combinatorics. What is the most number of rooks that can be placed on a chess boards such that no two of which attack each other? Again, we can list the millions of different ways we can put 1 rook, 2 rooks, 3 rooks, ... and see when, no matter how we put the rooks, they always attack one another. This is again a foolish and incredibly time consuming way to solve the problem. Instead we can use the pigeonhole principle. There are 8 coloumns on a chess board. If we put 9 rooks on a chess board then by the pigeonhole principle two of them end up in the same coloumn (since 9>8). In that column the rooks will attack one another. Thus, if we have nine rooks we are guaranteed that no matter how we position them that two must attack one another. Indeed 9 is the smallest such number, it does not necessarily work for 8, if all eight are put into different columns. So we solved this problem without actually listing the myriad of all possibilities. Mathematicians who work in combinatorics are combinatorialists.
Analysis is the study of change. Analysis, I believe, is by far the largest category in all of mathematics. It is incredibly important for applied mathematics. Calculus, what you learned in high school and college is the simplest example of analysis. Calculus worked with finding rates of change and areas of irregular shaped regions. Function and shapes that were always constantly changing. In baby high school math the distance-rate-time problems are unrealistic: "if a man travels at 60 miles per hour for 2 hours how much does he travel?". This is an unrealistic and overly simplistic problem. No one ever travels at 60 miles per hour constantly. People slow down, speed up, stop, the actual speed is variable and it can be complicated. Calculus allows us to solve this problem. Calculus allows us to compute the total distance traveled with variable speed. The problems in calculus are more complicated than in baby math where everything is taken as constant. There is so much more to analysis than just calculus. Differential equations play a big role in analysis. Differential equations are equations that describe the rate of change of a particular phenomenon, or a few phenomenon, solving such an equation gives us an understanding how something changes over time. Mathematics who work in analysis are analysts.
Geometry is the study of space. The word "geometry" is a Greek word that means "measuring the earth". Geometry was inspired by such practical problems but in its modern form geometry is way more abstract than what the ancients have ever envisioned. "Space" can be our three dimensional world. But "space" can also be a highly abstract 10 dimensional world. It can be Euclidean, i.e. a generalization of our world into more dimensions. Or it can be incredibly messed up. Sometimes geometry is synonymous with "topology". The word "topology" means, "study of space". In topology we deform objects into one another without breaking them apart (such as ripping them). From a topological point of view a square and a circle are the same because we can deform a square into a circle. But a sphere is not topologically the same as a sheet of paper because a sphere is closed, we cannot unravel a sphere into a plane without ripping it apart. Modern geometry also takes place on non-flat surfaces. Basic high school geometry that you learn was for the most part plane geometry. Geometry consisting of lines and points lying on some plane. Modern geometry allows to work with curves, not on planes, but on various curved surfaces. Mathematicians who work in geometry are geometers or topologists.
Algebra is the study of structure and symmetry. Algebra is a lot more difficult to explain than the others because algebra is a lot more abstract. The best way I can put it is with some example. Consider a cube. We can ask for the symmetries of a cube. That is, what operations on the cube leave the cube intact? We can rotate the cube about three of its axes without changing how the cube looks. We can also reflect a cube through its center, if we imagine a mirror passing through the center of a cube then reflecting the cube through the mirror will leave it unchanged. Rotations and reflections are symmetries of a cube. Once we have these symmetries we can form something known as a "group" which represents these symmetries and has operations defined between these symmetries. If we can understand what this group is, sometimes we say "determining the structure of the group" then we can reduce problems about symmetry to the solved problem of group structure. I realize that this is not the best way to explain what algebra is about but like I said it is not easy to explain what it is in a single paragraph. I am just trying to give some idea what it is about. Mathematicians who work in algebra are known as algebraists.
This is a basic overview of what mathematics is about. I cannot explain more because that would take a long time to explain. But if you are interested there are books written for people who are interested in understanding what mathematics is.