Factor the numerator -- that is, the number on top of the fraction -- into its prime factors. In other words, choose one pair of factors to work with, then keep factoring those factors until you're left with only prime numbers. So for the number 12, you could choose the factors 2 and 6 to work with. Two is already a prime number, but you can further factor 6 into the numbers 2 and 3, because 2 * 3 = 6. So the prime factors of 12 are 2, 2 and 3. Check your work by verifying that 2 * 2 * 3 = 12.
Find the prime factors of the denominator, the number on the bottom of the fraction. If the number in question is 18, you could factor it into 3 * 6, then further break 6 into its prime factors of 2 and 3. So the prime factors of 18 are 2, 3 and 3.
Cross out, or "cancel," any factors that are present in both the numerator and denominator. So to continue our example, 12/18 factored to (2 * 2 * 3)/(2 * 3 * 3). Both the numerator and denominator contain one "2" and one "3"; cross these out and you're left with 2/3, the simplified form of 12/18. Because 2 and 3 are both prime numbers, you cannot simplify 2/3 any further.
Break each side of the equation down into its prime factors. So if your equation is 3x = 6y, the prime factors are 3 * x = 2 * 3 * y. Note that because variables represent unknown numbers, you cannot break them down into factors -- but you can treat each variable itself as if it were a prime factor.
Simplify the equation by crossing out pairs of prime factors that appear on both sides of the equal sign. In this case, the only prime factor that appears on both sides of the equal sign is 3. Technically you're dividing both sides of the equation by 3 to eliminate that factor, but the end result is the same as if you'd simply crossed out a pair of factors.
Evaluate the result to see if it can be further factored and simplified. In this case the resulting equation is x = 2y, and because you must treat the variables as prime factors, it cannot be further factored or simplified.