Blood that is haram and najis is blood that flows out of the arteries when the animal is slaughtered in the halal way, and not any that remains within the flesh.
This is based on the verse of the Quran that has specifically prohibited it:
لا أجد في ما أوحي إلي محرما على طاعم يطعمه إلا أن يكون ميتة أو دما مسفوحا
Say, "I do not find within that which was revealed to me [anything] forbidden to one who would eat it unless it be a dead animal or blood spilled out ...
— Quran 6:145
And the hadith permitting liver and spleen, although it is rich in blood:
أحلت لنا ميتتان ودمان ... وأما الدمان فالكبد والطحال
Two kinds of dead meat and two kinds of blood have been permitted to us ... and the two kinds of blood are the liver and spleen
— Sunan Ibn Majah
The following is a section from Tafsir al-Jassas on Surah al-Baqarah, باب تحريم الدم (Chapter - The Prohibition of Blood).
Note:- The english text is my own personal translation and may contain paraphrasing , mistakes and omissions
قال الله تعالى : إنما حرم عليكم الميتة والدم وقال : حرمت عليكم الميتة والدم فلو لم يرد في تحريمه غير هاتين الآيتين لاقتضى ذلك تحريم سائر الدماء قليلها وكثيرها
فلما قال في آية أخرى : قل لا أجد في ما أوحي إلي محرما على طاعم يطعمه إلا أن يكون ميتة أو دما مسفوحا دل ذلك على أن المحرم من الدم هو المسفوح دون غيره
Allah says: "He has only forbidden to you dead animals and blood" (2:173,16:115) and "Prohibited to you are dead animals and blood" (5:3). If apart from these two, no other verse was present in the Quran on the prohibition of blood, then every blood would be haram, be it a small or large quantity.
However the verse was revealed: "Say, I do not find within that which was revealed to me [anything] forbidden to one who would eat it unless it be a dead animal or blood spilled out" (Quran 6:145) which is evidence that only blood that spills out is forbidden and not other than it.
فإن قال قائل : قوله : أو دما مسفوحا خاص فيما كان منه على هذه الصفة ، وقوله في الآيتين الأخريين عام في سائر الدماء ، فوجب إجراؤه على عمومه ؛ إذ ليس في الآية ما يخصه
قيل له : قوله : أو دما مسفوحا جاء فيه نفي لتحريم سائر الدماء إلا ما كان منه بهذا الوصف ؛ لأنه قال : قل لا أجد في ما أوحي إلي محرما على طاعم إلى قوله : أو دما مسفوحا
وإذ كان ذلك على ما وصفنا لم يخل من أن يكون قوله : إنما حرم عليكم الميتة والدم متأخرا عن قوله : أو دما مسفوحا أو أن يكونا نزلا معا
فلما عدمنا تاريخ نزول الآيتين وجب الحكم بنزولهما معا ، فلا يثبت حينئذ تحريم الدم إلا معقودا بهذه الصفة وهو أن يكون مسفوحا
Someone might object and say that 6:145 is a specific prohibition on blood that has that attribute whereas the other two verses have prohibited all classes of blood in general, and that is why it is obligatory to act on the general prohibition because those two verses do not make any exception.
The answer to this is that 6:145 negates the prohibition of every type of blood except blood that has the attribute of spilling out, because the verse is "I do not find within that which was revealed to me [anything] forbidden to one who would eat it unless it be ... blood spilled out".
Either the verses were revealed at different times [in which case one abrogates the other] or they were revealed together [both are in effect and both imply the same thing]. When we do not know for certain that one has abrogated another then we must assume that they are both in effect and the general verse on prohibition of blood actually refers to the same specific case of blood that spills out.
وحدثنا أبو القاسم عبد الله بن محمد بن إسحاق المروزي قال : حدثنا الحسين بن أبي الربيع الجرجاني : أخبرنا عبد الرزاق قال : أخبرنا ابن عيينة عن عمرو بن دينار عن عكرمة قال : لولا هذه الآية : أو دما مسفوحا لاتبع المسلمون من العروق ما اتبع اليهود
وحدثنا عبد الله بن محمد قال : حدثنا الحسن قال : أخبرنا عبد الرزاق قال : أخبرنا معمر عن قتادة في قوله : أو دما مسفوحا قال : " حرم من الدم ما كان مسفوحا ، وأما اللحم يخالطه الدم فلا بأس به "۔
وروى القاسم بن محمد عن عائشة ، أنها سئلت عن الدم يكون في اللحم والمذبح قالت : " إنما نهى الله عن الدم المسفوح "۔
ولا خلاف بين الفقهاء في جواز أكل اللحم مع بقاء أجزاء الدم في العروق ؛ لأنه غير مسفوح
[chain] narrated from Ikrimah that he said: If this verse "or blood spilled out" (Quran 6:145) did not exist then the Muslims would have observed prohibition of the blood vessels like the Jews.
[chain] narrated from Qatadah in the Tafsir of that he said, the blood that is spilled is haram, but there is no harm in eating meat that has blood in it.
[] narrated from Ayesha that she was asked about meat on which there was blood, and the place of slaughter (which is stained with blood). She said that Allah has only forbidden blood that has been spilled out.
There is no difference among the jurists that if parts of the blood are present in the vessels of flesh, then it is permitted to eat it because it is not blood that spills out.
— أحكام القرآن للجصاص , Alternate link
As for pigs, they are haram and najis in whole, and there are hadith forbidding even their sale and using of pots where their meat has touched.
The Quran has specifically mentioned their meat because that is their part from which people usually try to gain benefit and all lesser means of taking benefit are automatically implied.
An example of this is cited in 62:9 where people are especially told to leave trade at the time of Jummah because that is their most common activity, and this implies leaving everything else as well.