Sometimes yes and sometimes no.
A betting site may ask you to complete a so-called wagering requirement. This means that you need to wager your earnings a certain number of times before it can be withdrawn to your bank account.
In other cases, you are free to keep all the profits that you made from a free bet!