Go back to the definition of the trace of a matrix in euclidean space. If you choose a basis, in which the linear map $A$ has components $A_i^j$, then the trace is $$TrA=\sum_{i=1}^{d} A_i^i$$
But notice how uncovariant this description is. There seems to be no mention of the metric anywhere. But this is misleading. Recall what $A_i^i$ is. If you let $A$ act on the basis vector $e_i$, you have $$Ae_i=A_i^je_j$$How do you get $A_i^i$ from this?Simple, take the inner product with $e_i$, $$\langle e_i, Ae_i \rangle=A_i^j\langle e_i, e_j \rangle=A_i^i$$
So here you have it. You can rewrite the trace as $$TrA=\sum_{i=1}^N A_i^j \langle e_i, e_j \rangle$$
When you then consider a general metric manifold, the linear map $A$ now does not act on any euclidean space with any metric, but in the tangent space with the metric dictated by the manifold. So you can repeat every step of what I did, if you formally replace $\langle e_i,e_j \rangle$ with $g(e_i,e_j)$ or $g_{ij}$, since the metric gives you the inner product. So the definition of trace on a metric manifold must become $$TrA=\sum_{i=1}^{dimM}A_i^j g_{ij}$$
Finally, starting not with a linear map on and from the tangent space, but with a twice covariant tensor like the Ricci, tensor, and remembering that the inner product of the dual basis is given by $g^{ij}$ instead of $g_{ij}$, you would have arrived at $$TrA=g^{ij}A_{ij}$$
and now hopefully the definition of the Ricci scalar makes sense.
The main point is that the trace of a tensor tells you about the magnitude of its image on repeated copies of the same basis, so to speak. For example, the Ricci tensor tells you about the geodesic(along $\mu$ direction) deviation (along $\nu$) direction about some point in spacetime, so it's a measure of sectional curvature. If you want to know some kind of "average" sectional curvature you must add that curvature in all directions. To do that you have to dot the image with every basis and add it all up. This is what is achieved by contracting with the metric tensor. So the Ricci tensor contains information about the mean sectional curvature of the manifold; in other words, it measures how the volume of objects change along geodesics. Of course all this is meant in a loose sense, but that's the gist of it