Here's why:
* Preposition: "up" is the preposition.
* Object of the preposition: "the hill" is the noun phrase that follows the preposition and is the object of the preposition.
The prepositional phrase acts as an adverb, modifying the verb "ran" by telling us where Jack and Jill ran.