For example, when you have 10 feet and want to convert it to meters, you multiply by some fixed constant K = 0.3048 meters / foot, to get
10 foot x 0.3048 (meters / foot) = 3.048 meters

When you have 197.3 nanometers (197.3 x 10^(-9) meter) you have to multiply by some other constant K'. We can make K' out of the fundamental constants c and hbar which occur in high-energy physics, by playing around with the units. We note that K' has to have units of energy / meter. Since hbar has units of energy * time and c has units of length / time, we easily see that we need to take K' = hbar c which gives a numerical value of K' = 1.973... × 10^(-16) GeV * meter. Then to express 197.3 nm in energy units, you just compute
[tex]\frac{197.3 \times 10^{-9} \text{ meter}}{1.973\cdots \text{ GeV meter}} = 10^{-9} \text{ GeV}[/tex]
(= 1 eV).

The reason that all of this is actually useful, is for example that we have Einstein's special theory of relativity, which says that it actually makes sense to compare energy and mass.

However, if you are mentally disturbed you could make up new constants, like
p = 1237659,312398 GeV / quack
and express energy, time and length in terms of quacks.