I get how to do that, I usually do something along these lines:
which is just checking whether or not a point is within a rectangular area, but I know methods that check whether or not, for example, a circle and rectangle intersect. I have no idea how they check within the area of a circle like that as well as other irregular shapes.
circles are usually just distance checks or radius checks from the center point
shapes other than basic primitives(circle/aabb) usually require more complicated approaches, such as Separating Axis Theorem for example