A raft helps when the part has few points of contact with the print bed, and doesn't therefore adhere well at points within and without the part.
A brim helps when the part doesn't adhere well around the perimeter of the part.
There are very rare situations where you'll need both, but typically you'll only use one or the other.