You could do either. You could use a parentCategoryId or a separate table. It really depends on the final requirements of the solution you are creating... just one level of subcategories? or do you want to support:
Category - subcategory - further subcategory - further subcategory - further subcategory - list of products
Really there isn't a right way or a wrong way. Each would have pros and cons.