In the dictionary, the words "convert" and "transform" both have the meaning of changing the form of something. So how should I distinguish them? In what situation they are of the same meaning, and in what situation they are different?
Transform stands on its own. Convert implies convert to or convert from. A native-speaker's brain expects more information, a second part to the concept, with convert.
The house was transformed.
The cell was transformed.
She went through a remarkable transformation.
The empty nesters converted their kids' rooms into a library and a painting studio.
You've almost converted me to your way of thinking.
(They are generally synonymous, so depending on context a native speaker may expect more information with transform as well, but the expectation is not inherent as it is with convert.)
As stated previously, the electrical example, though different from most usage, makes an easier case for distinction. A transformer only changes one attribute, so that the result is the same basic type, but of a different capacity or intensity (voltage for example). A converter, on the other hand makes the resulting object different in type from then initial condition, for example changing alternating current to direct current. If we could apply this in general, then most of us would be in error in our usage of the two words. Convert would mean something's natural attributes were changed, transform would mean the the size, shape, color, or some other attribute was changed, but the root nature of the item (or attitude or belief) was not changed.
They are largely , and in most cases do mean the same thing (Though as stated in the question comments, electric transformation and electric conversion are quite different).
Their primary definition (the first definition in both these links) is largely the same though. In fact, looking at the root for both words, they both appear to come from Middle English and Old French, making them quite similar indeed!
So the difference then must be in how they are used in speech.
Pardon me, for I am about to use a very peculiar example of the word "transform".
In America, there was once a cartoon show called "Transformers", which you may have heard of. It features robotic life forms that can transform into various different things, cars, radios, animals, et cetera. Now, what if that show were instead called "Converters"? It sounds a bit wrong, doesn't it? It sounds as if they are not so much beings that change shape, but rather beings that cause a change in shape to others.
It is true that "transformer" could also mean "one who causes a change in shape of another" though. This is why it is a connotative difference, rather than a definitive one. You will note that in the definition for "convert", it is stated to "change(something)", which implies an action upon another thing. It does not necessarily mean that 'other thing' is not the thing doing the converting, but it implies that it is. Likewise, 'transform' does not explicitly mean that one is transforming oneself, or another, but is better suited to imply a self-alteration.
This is NOT, however, always the case. In fact, they say in religion that when one chooses to pick a religion different than their original choice, that they are a 'convert' or that they 'converted', even though that choice can be entirely in their own power. It would be equally valid to say they "transformed" their beliefs, but it is rarely said that way.
Two words that have the same meaning can often be used to mean different things depending entirely on the context in which they are said, and in a larger sense, the context in which those words are used in the english language.
The normal verb for the idea of "to change the form of sth" is "to transform" from Latin trans over and forma form. "To convert" from Latin vertere to change direction is used in special contexts such as
in religion: He converted to Buddhism
in linguistics: a noun can convert to a verb without change of form
and a lot of other sectors (architecture, electricity, mathematics etc).