There are two main ways to measure pH. The first uses universal indicator, a mixture of dyes that changes colour across the pH scale. You can use it as a solution or on indicator paper. Add a few drops to a small sample of the solution in a test tube or spotting tile, or dip a piece of paper in, and then compare the colour with a chart. Red is strongly acidic, orange and yellow are weakly acidic, green is neutral, and blue or purple is alkaline. This is quick and cheap, but it relies on judging a colour by eye, so it gives a whole number at best. It is also no use for solutions that are already coloured.
The second method uses a pH meter. This has a probe that you dip into the solution, and a digital display shows the pH. Before use the probe is calibrated with a solution of known pH, called a buffer, and it is rinsed with distilled water between samples so one solution does not contaminate the next. A pH meter is more precise than universal indicator, gives a reading that does not depend on someone judging a colour, and can be used with coloured solutions.
To find the pH of an unknown solution, test it with universal indicator first to get an approximate value, then use a pH meter if a more accurate result is needed.