If you don't have regular glasses, pinhole glasses would be a good solution for temporary use. But it will not correct your vision. So it is better to get prescription glasses otherwise your vision may become worse in the future.
Yes. People with nearsightedness can see more clearly with pinhole glasses because the holes can bring blurry images into focus and then you can see them clearly. But you'd better not use them in a dimly light place.
Most nearsighted people prefer to wear pinhole glasses because there is no eye exam, no prescription needed. You Just put them on and see clearly. But they can only improve your vision for a short time and can't be the replacement for prescription glasses. So you need to get your glasses as soon as possible.