you can go to a hair salon and have them mix the colours until they get a blue dye
you could buy a semi-permanent colour (i suggest manic panic)
you could get a very cheap wash in-wash out colour that washes out in one wash (to be honest it is rubbish)
if your hair is dark you will have to bleach it to a lighter colour with peroxide hair bleach.
tip: when you wash your hair before you dye it do not apply conditioner (the colour won't stick very well) but do bear in mind that it is best to have dirty (ish) hair before you dye it.
if you want to dye your hair blue-black then you can get cheap buy in shops. i reccomend Schwarzkopf cosmic blue