In the artery vs vein comparison, there are clear functional and structural differences between these two blood vessels. Although they are both parts of the cardiovascular system, there are three important distinctions between them; the function they perform, the type of blood they convey, and the structural feature which one has and the other lacks. Nevertheless, at their extreme ends they are connected by the capillaries, which close the circulatory circuit. At this connection point the arteries and veins are so thin they are called arteriole and venule respectively.
The arteries carry oxygenated blood from the left ventricle of the heart to the rest of the body, with the aorta being the main artery, from which branches arise to supply the different tissues and organs with oxygen and nutrients. The oxygen gets into the blood when we breathe in. They transport the blood under the steady pressure of every systolic contraction of the myocardium; to put it plainly, arteries are able to carry blood thanks to the pumping action of the heart. This is the reason that when we measure somebody’s blood pressure, we do it on an artery.
The veins convey deoxygenated blood from the body tissues and organs back to the heart, to the right atrium, from which it runs into the right ventricle and finally into the lungs. By ‘deoxygenated’ I mean it contains carbon dioxide (CO2), which is expelled from the lungs when we exhale. CO2 is the main byproduct of the cellular respiration when the cells produce ATP (energy). Since they carry the blood back to the heart, that returning blood flow does not depend on the systole (heart ventricles contraction) but on the diastole, which is the heart relaxation; when it relaxes, the myocardium expands outwards as it returns to the normal shape as the right ventricle sucks in the returning blood.
Therefore, when the heart is in diastole, it has a suction action as it draws the blood into the right atrium. This is the opposite to the pumping action of the left ventricle (systole). Since the diastole (relaxation) suction effect is weaker than the systole (contraction), veins are aided by a series of valves, which prevent the deoxygenated blood from flowing back to the capillaries. These valves are located along the lumen of the veins; these valves are not present in arteries.
Below, a picture/diagram of the cardiovascular system, showing the arteries (in red) and veins (in blue).