A pedestrian crosses when they feel it is safe to do so, and anywhere along the road they choose. Having started to cross they have priority over traffic. Lately some drivers are less inclined to give way to pedestrians, but the law hasn't changed, and they are still legally obliged to do so. Motorways, of course, have no pedestrians.
The word was originally from jay-drivers. Which was a forgotten American term of abuse for carriage drivers who did not stick to the correct side of the road! Once cars arrived the industry lobbied and jaywalking became a term of abuse for pedestrians, and eventually a law.