You will receive a citizen service number when registering with the municipality (known as gemeente) within the city that you will be resident. Usually this registration can be done at the city hall, known as the gemeentehuis.
Do keep in mind that having a BSN in the Netherlands, does not automatically give you permission to work in the Netherlands and does not equal to a work permit. Depending on your home country, you may need to apply for this separately.
You are a so-called ‘non-resident’, if you are staying in the Netherlands for less than 4 months. Although you are not resided in the Netherlands permanently, you have to deal with the Dutch government, as you need to register as a non-resident. You can do this with a municipality that has a special registration facility. After registration, you will receive a BSN directly.