It depends which school of grammar you follow. It would traditionally have been labelled an adverb, but some grammarians today have it as a preposition.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.