This is a pretty simple thing to fix, so no worries! The $1_{[0,1]}(x)$ is merely an indicator function. Remember that the area under the density function must integrate to 1. If you graphed $f_X(x)$ without the indicator on a graph, the area wouldn't integrate to 1. The area would, however, integrate to one if you restricted the function on the interval $[0,1].$
The indicator function $1_{[a,b]}(x)$ equals 1 on $[a,b]$ and equals 0 everywhere else (that is, outside $[a,b]$). The function $f_X(x)$ includes the indicator function $1_{[0,1]}(x)$ so that $6x(1-x)$ is nonzero only on the interval $[0,1]$ and is zero everywhere else.
In order to sample from that density, you need to only generate a random number from that density and discard any number outside of $[0,1].$ There's likely an easy way to accomplish this in your software of choice, but I hope this helps to get you started!