Same structure, different register
Both constructions follow the same pattern: Subject + 将/把 + Object + Verb + other element (result, direction, duration). 请将垃圾扔进垃圾桶 and 请把垃圾扔进垃圾桶 both mean "please throw the trash into the bin". The first sounds like a public sign or formal announcement. The second sounds like your roommate asking. Both are grammatical, but using 将 in casual conversation makes you sound stiff, and using 把 in a legal document makes the document feel unprofessional.
Where you see 将
将 appears in written Chinese, news reports, legal documents, formal announcements, academic writing, and classical-style poetry. 将...进行到底 (carry something through to the end) is a set phrase from political rhetoric. 将军 (jiāngjūn, general) uses a different meaning of 将 entirely (to lead). In contemporary Mandarin, 将 as an object marker has gradually shifted into the higher register, reserved for situations where formality matters.
公司将本次活动的收益全部捐给慈善机构。
Gōngsī jiāng běn cì huódòng de shōuyì quánbù juān gěi císhàn jīgòu.
The company will donate all proceeds from this event to charity.
Where you see 把
把 is the default spoken form and appears in all casual written contexts: text messages, WeChat conversations, blog posts, fiction dialogue, and most journalism. Native speakers use 把 hundreds of times a day and 将 much more rarely. If you are learning Mandarin for speaking, 把 is what you drill; 将 you read but seldom produce.
把门关上,外面太冷了。
Bǎ mén guān shang, wàimiàn tài lěng le.
Close the door; it is too cold outside.
将 as future tense marker
将 has a second unrelated grammatical use: as a formal future tense marker. 他将参加明天的会议 means "he will attend tomorrow's meeting". In spoken Mandarin, 会 or nothing at all serves this purpose. 他会参加明天的会议 or just 他参加明天的会议 are the casual versions. Do not confuse this 将 with the object-marker 将; the future-marker 将 precedes the main verb directly with no object in between.
The 将...进行到底 and other set phrases
Some idiomatic phrases lock in 将 and cannot be swapped for 把. 将...进行到底 (carry something to its end, politically charged), 将心比心 (put oneself in another's shoes), 将计就计 (turn the trap on the trapper). These are fixed expressions with literary weight; 把 substitution would feel wrong. Memorize them as units.