Is it possible to replace my phone wires t network wires in the walls?
If you are thinking of using the existing phone wires to pull ethernet cable through the walls, the answer is most likely no.  The phone wire is almost certainly smaller, so it will probably be passing through smaller holes. On top of that, it is likely stapled to the framing.

That said, fishing new wire through the walls usually isn't that hard if you have access to the bottoms and tops of the interior walls in the basement and the attic. The easiest way would typically be to wire the first floor in a star pattern from the basement, and the top floor in a star pattern from the attic, then connect them with one cable running from basement to attic. Good places to try and fish a basement to attic cable would be alongside the main vent stack for your plumbing or through a wet wall. If you don't want to put individual jacks in the walls, you can always just run one cable and put a second access point on the upper floor.