1.Learn your key signatures
2.Practice learning keys by listening to a song in that key and hearing the key on an instrument such as guitar or Piano
3.Practice all keys
4.Make music with a tone in mind
5.Train your ear off
This really takes time if you want it by ear. My source is I'm a music minor in college right now, but if you don't have a guitar or piano I'd recommend using a free cheap vst, and I'd personally reccomend using the piano as a pitch marker over everything as today it is the instrument in modern day in which all western things are tuned to or share its tuning.
I'd say train your ear to western music first i.e. hip hop, edm, country, rock, blues, classical, etc., and when you master that advance to world music. That is if oyu want to do world music also.