How and when did Julius Caesar become emperor?

Julius Caesar was never a true emperor but in 49 B.C he declared himself as emperor or ''king'' of rome .