を and へ: objects, paths, directions
を can mark a path as well as an action's object. へ marks a direction of movement; the presence of a movement verb does not make these particles interchangeable.
Mark an action's object
水を飲みます。 means 'I drink water,' and 本を読みます。 means 'I read a book.' を marks what is drunk or read. In ordinary modern Japanese, the particle is pronounced like お.
Learn combinations such as 水を飲む, including the particle. When an object becomes a topic, は can replace を, as in 水は飲みます. You will therefore encounter object-related sentences without an explicit を.
Paths and places left behind
公園を歩きます。 describes walking through or around the park as a route or space traversed. 公園で歩きます。 emphasizes the location of the activity; を emphasizes movement through that space.
In 家を出ます。 ('I leave home'), を marks the place being left. The house is not an object being consumed or read. Do not classify every use of を from a single translation pattern.
Express direction with へ
学校へ行きます。 means 'I go to school.' The particle へ is pronounced e and expresses direction. In this example, 学校に行きます is also natural, with に marking the destination.
公園を歩く and 公園へ歩いて行く do not mean the same thing. The former describes walking through the park; the latter describes walking toward it. Identify whether the phrase gives a departure point, a path, or a destination.
Check: Does 公園を歩きます simply mean 'I walk toward the park'?
Show the answer and why
No. Here を marks the park as the space traversed. To express direction toward the park, you can say 公園へ歩いて行きます。

