Domain is what can go in, so what x's are allowed. In this case a sin wave can go from negative infinity to infinity in the x direction, so the domain is all real numbers.
Range is what can come out, so what y's can come out. For sinx, the wave will go up to 1 then down to -1 then up to 1 then down to negative one & repeat forever, so the range is -1 ≤ y ≤ 1.
Note: an example for something that is not a function is a circle. Center a circle at (0,0). Now pick a point on the x axis that is INSIDE the circle, let's say x = 1. Notice if you go up, you will hit the circle at a y value, but if you go down from x = 1, you will hit the circle a SECOND time at a different y value, which is not allowed in a function, so a circle isn't a function.