Sorting algorithm, possibly a new one I'm a beginner who has never seen a sorting algorithm's implementation and have decided to try make one on my own (can someone tell me if this has been already used?).

The fact is I have never used iterators, but since I wanted to make this more generic I decided to quickly look them up.

Also, can anyone suggest what to do if someone passes the same iterator twice?

#include &lt;iterator&gt;
#include &lt;algorithm&gt;

template &lt;typename container&gt;
inline void
sort
(typename container::iterator beginning,
 typename container::iterator end       )
{
    typedef typename container::value_type type_contained;
    typename container::iterator beginning_original_state = beginning;
    while (beginning &lt;= end)
    {
        if (*beginning &gt; *(beginning + 1))
        {
            // Gotta change the name to something more meaningful
            auto check_back(beginning);

            while (check_back != beginning_original_state &amp;&amp; *check_back &lt; *(check_back - 1))
            {
                std::swap(check_back, --check_back);
            }
        }
        else
        {
            ++beginning;
        }
    }
}
Algorithm
What you have implemented is called (linear) insertion sort. It is very old, sorry your method is not new or novel ;) It has average case O(n^2) time complexity which is basically unusable for anything with more than a few thousand/tens of thousands elements. I recommend that you study the classic algorithms: Bubble Sort, (Cocktail) Shaker Sort, Insertion Sort, Shell Sort, Merge Sort, Heap Sort, Radix Sort and Quick Sort.
There is a classic video from 1981 that is part of many CS curriculums called Sorting out Sorting which is very illustrative and a recommended watch.
Code
You never use type_contained remove it.
Once the unused type is removed you can change your template parameter to the iterator type directly and get rid of a lot of typing. This also allows template parameter deduction so that you don't have to explicitly state the container type as a template parameter.
Please don't reuse the argument beginning as a variable. It is hard to read when your iteration variable is named begin with another being original begin. Simply make a copy of begin, call it it for iterator or current.
Typically when two iterators are used to represent a range we use the names: first and last. To not confuse with begin() and end() and avoid a name collision when some one uses using namespace std;  (which you shouldn't!).
In general I'm not fond of your naming. For example check_back could simply be previous.
You don't need the inline specifier. You need a better algorithm. The compiler will automatically inline if it makes sense.
Bug
In the code here:
while (beginning &lt;= end)
{
    if (*beginning &gt; *(beginning + 1))

you will dereference the end iterator + 1 which is beyond the end of the range. Also note that typically one expects the first iterator to be inclusive and the second to be exclusive (as is returned from begin() and end() on containers). So when used as expected your code will go 2 elements outside of the range. This results in undefined behaviour.
Also here:
std::swap(check_back, --check_back);

you are swapping the iterators, not the values they point to. Which means that the code doesn't even work at all. It gets stuck in an infinite loop, always. Not only that, but the order in which the arguments are evaluated is undefined so this type of code might not work if the check_back variable is decremented first.
You would have noticed all of the above if you tried to use this code in any way before posting to review. For future reference, we only review working code and this question is actually off-topic due to it not working at all.
Cleaning it all up and fixing the bugs we get:
#include &lt;iterator&gt;
#include &lt;algorithm&gt;

template &lt;typename Iterator&gt;
void sort(Iterator first, Iterator last){
    auto it = first+1;
    while (it &lt; last){
        auto prev = it;
        while (prev != first &amp;&amp; *(prev-1) &gt; *prev){
            std::iter_swap(prev-1, prev);
            prev--;
        }
        it++;
    }
}