text:
Invalid Invali Inval
This idea is loosely based upon @TùxCräftîñg's chat message.
Take a look at the below example sequence:
INVALID0, INVALID1, INVALID2 INVALID3, INVALID4... INVALID9
After INVALID9, it goes on like this:
INVALI0, INVALI1, INVALI2, INVALI3... INVALI9
And after INVALI9, it's like this:
INVAL0,INVAL1, INVAL2, INVAL3... INVAL9
After, INVAL9, it's like this:
INVA0, INVA1, INVA2, INVA3, ... INVA9
Notice how we we kept removing a letter from the word INVALID each time.
You'll keep repeating this until you reach a single letter, that is, the letter I:
I0, I1, I2, I3, I4 ... I9
Now, your task is, to take an input of a word, and produce a sequence from it like the above example. Your code must also work with single letters, and in that case the resulting sequence will be shorter.
You may choose any input and output format that you prefer (with or without a separator, as you wish), but you must specify which one you have chosen.
The sequence needs to be in the exact specified order.
The shortest code, in bytes, that successfully completes this challenge, wins the challenge.
Full sequence in the above example:
INVALID0, INVALID1, INVALID2, INVALID3, INVALID4, INVALID5, INVALID6, INVALID7, INVALID8, INVALID9, INVALI0, INVALI1, INVALI2, INVALI3, INVALI4, INVALI5, INVALI6, INVALI7, INVALI8, INVALI9, INVAL0, INVAL1, INVAL2, INVAL3, INVAL4, INVAL5, INVAL6, INVAL7, INVAL8, INVAL9, INVA0, INVA1, INVA2, INVA3, INVA4, INVA5, INVA6, INVA7, INVA8, INVA9, INV0, INV1, INV2, INV3, INV4, INV5, INV6, INV7, INV8, INV9, IN0, IN1, IN2, IN3, IN4, IN5, IN6, IN7, IN8, IN9, I0, I1, I2, I3, I4, I5, I6, I7, I8, I9

Other examples:
Input: MAYBE (Uppercase and lowercase don't matter)
Output:
MAYBE0, MAYBE1, MAYBE2, MAYBE3, MAYBE4, MAYBE5, MAYBE6, MAYBE7, MAYBE8, MAYBE9, MAYB0, MAYB1, MAYB2, MAYB3, MAYB4, MAYB5, MAYB6, MAYB7, MAYB8, MAYB9, MAY0, MAY1, MAY2, MAY3, MAY4, MAY5, MAY6, MAY7, MAY8, MAY9, MA0, MA1, MA2, MA3, MA4, MA5, MA6, MA7, MA8, MA9, M0, M1, M2, M3, M4, M5, M6, M7, M8, M9

Input: AFTER
Output:
AFTER0, AFTER1, AFTER2, AFTER3, AFTER4, AFTER5, AFTER6, AFTER7, AFTER8, AFTER9, AFTE0, AFTE1, AFTE2, AFTE3, AFTE4, AFTE5, AFTE6, AFTE7, AFTE8, AFTE9, AFT0, AFT1, AFT2, AFT3, AFT4, AFT5, AFT6, AFT7, AFT8, AFT9, AF0, AF1, AF2, AF3, AF4, AF5, AF6, AF7, AF8, AF9, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9

Input: WHAT ARE YOU DOING
WHAT ARE YOU DOING0, WHAT ARE YOU DOING1, WHAT ARE YOU DOING2, WHAT ARE YOU DOING3, WHAT ARE YOU DOING4, WHAT ARE YOU DOING5, WHAT ARE YOU DOING6, WHAT ARE YOU DOING7, WHAT ARE YOU DOING8, WHAT ARE YOU DOING9, WHAT ARE YOU DOIN0, WHAT ARE YOU DOIN1, WHAT ARE YOU DOIN2, WHAT ARE YOU DOIN3, WHAT ARE YOU DOIN4, WHAT ARE YOU DOIN5, WHAT ARE YOU DOIN6, WHAT ARE YOU DOIN7, WHAT ARE YOU DOIN8, WHAT ARE YOU DOIN9, WHAT ARE YOU DOI0, WHAT ARE YOU DOI1, WHAT ARE YOU DOI2, WHAT ARE YOU DOI3, WHAT ARE YOU DOI4, WHAT ARE YOU DOI5, WHAT ARE YOU DOI6, WHAT ARE YOU DOI7, WHAT ARE YOU DOI8, WHAT ARE YOU DOI9, WHAT ARE YOU DO0, WHAT ARE YOU DO1, WHAT ARE YOU DO2, WHAT ARE YOU DO3, WHAT ARE YOU DO4, WHAT ARE YOU DO5, WHAT ARE YOU DO6, WHAT ARE YOU DO7, WHAT ARE YOU DO8, WHAT ARE YOU DO9, WHAT ARE YOU D0, WHAT ARE YOU D1, WHAT ARE YOU D2, WHAT ARE YOU D3, WHAT ARE YOU D4, WHAT ARE YOU D5, WHAT ARE YOU D6, WHAT ARE YOU D7, WHAT ARE YOU D8, WHAT ARE YOU D9, WHAT ARE YOU 0, WHAT ARE YOU 1, WHAT ARE YOU 2, WHAT ARE YOU 3, WHAT ARE YOU 4, WHAT ARE YOU 5, WHAT ARE YOU 6, WHAT ARE YOU 7, WHAT ARE YOU 8, WHAT ARE YOU 9, WHAT ARE YOU0, WHAT ARE YOU1, WHAT ARE YOU2, WHAT ARE YOU3, WHAT ARE YOU4, WHAT ARE YOU5, WHAT ARE YOU6, WHAT ARE YOU7, WHAT ARE YOU8, WHAT ARE YOU9, WHAT ARE YO0, WHAT ARE YO1, WHAT ARE YO2, WHAT ARE YO3, WHAT ARE YO4, WHAT ARE YO5, WHAT ARE YO6, WHAT ARE YO7, WHAT ARE YO8, WHAT ARE YO9, WHAT ARE Y0, WHAT ARE Y1, WHAT ARE Y2, WHAT ARE Y3, WHAT ARE Y4, WHAT ARE Y5, WHAT ARE Y6, WHAT ARE Y7, WHAT ARE Y8, WHAT ARE Y9, WHAT ARE 0, WHAT ARE 1, WHAT ARE 2, WHAT ARE 3, WHAT ARE 4, WHAT ARE 5, WHAT ARE 6, WHAT ARE 7, WHAT ARE 8, WHAT ARE 9, WHAT ARE0, WHAT ARE1, WHAT ARE2, WHAT ARE3, WHAT ARE4, WHAT ARE5, WHAT ARE6, WHAT ARE7, WHAT ARE8, WHAT ARE9, WHAT AR0, WHAT AR1, WHAT AR2, WHAT AR3, WHAT AR4, WHAT AR5, WHAT AR6, WHAT AR7, WHAT AR8, WHAT AR9, WHAT A0, WHAT A1, WHAT A2, WHAT A3, WHAT A4, WHAT A5, WHAT A6, WHAT A7, WHAT A8, WHAT A9, WHAT 0, WHAT 1, WHAT 2, WHAT 3, WHAT 4, WHAT 5, WHAT 6, WHAT 7, WHAT 8, WHAT 9, WHAT0, WHAT1, WHAT2, WHAT3, WHAT4, WHAT5, WHAT6, WHAT7, WHAT8, WHAT9, WHA0, WHA1, WHA2, WHA3, WHA4, WHA5, WHA6, WHA7, WHA8, WHA9, WH0, WH1, WH2, WH3, WH4, WH5, WH6, WH7, WH8, WH9, W0, W1, W2, W3, W4, W5, W6, W7, W8, W9

Leaderboard

var QUESTION_ID=92156,OVERRIDE_USER=58717;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Could you post the full sequence all at once? Possibly with some more samples? Also, what may the input possibly contain?

Is a lack of separator (e.g. INVALID0INVALID1INVALID2) a valid output format?

@DLosc Yes, it is.

Just so you know, it is generally discouraged to accept an answer so quickly after posting the challenge. Accepting too early can discourage users from posting new answers. That's not to say you can't keep the accepted answer, but I'd encourage you to wait longer next time.

@DJMcMayhem Okay!

Jelly, 7 bytes
ḣJṚp⁵Ḷ¤

Try it online!
How it works
ḣJṚp⁵Ḷ¤  Main link. Argument: s (string)

 J       Yield all (1-based) indices of s.
ḣ        Head; for each index k, take the first k characters of s.
  Ṛ      Reverse the result.
      ¤  Combine the two links to the left into a niladic chain.
    ⁵      Yield 10.
     Ḷ     Unlength; yield [0, ..., 9].
   p     Return the Cartesian product of the prefixes and the range.
         (implicit) Print the Cartesian product without separators.

7 bytes. I just want to know how someone came up with the idea of making this exact code work with the code golf.

Javascript (ES6), 53 47 bytes
f=(s,n=0)=>s&&s+n+f(n-9?s:s.slice(0,-1),++n%10)

Saved 6 bytes thanks to Peanut & Neil
Output: all words as a single string with no separator.
Example

var f=(s,n=0)=>s&&s+n+f(n-9?s:s.slice(0,-1),++n%10)

document.getElementsByTagName('div')[0].innerHTML = f('INVALID')

Saves you one byte, reducing it to 52 bytes, to not use separators (which is allowed) by not appending a space between items in the pattern. Try it here!

Can you not use s&& instead of s?...:''?

Also, you can reduce it to 49 bytes by removing the +'' part from the last code I posted. Try it here!

I'm using Firefox, and the text isn't separated by spaces. It's not required for the question, but I thought I'd let you know.

@TheBitByte - My bad. There's no separator anymore (as suggested by Peanut) but I forgot to update my answer accordingly. Thanks for noticing!

@Peanut - Thanks for your edit, but I've already included your suggested change + Neil's optimization. (Not sure if you can cancel it on your side or if I should reject it.)

I'm editing my edit request to include the new information. I was trying to edit it 3 hours ago, but someone had already put something in the queue.

Also, 49 less than 53 is 4, not 6.

@Peanut - The current answer is 47. Not 49.

How did it become 47? You can also accept my edit and then fix that. I have to go now, I'll see you later.

05AB1E, 10 8 bytes
.pžmâ€JR

Explanation
.p        # get prefixes of input
  žmâ     # cartesian product with [9..0]
     €J   # join each
       R  # reverse

Try it online!
Saved 2 bytes thanks to Adnan

.p is equivalent to Œ¹g£ :).

@Adnan: Seriously, how could I have forgot that again! Thanks! Seems like I should take a break :P

Perl, 29 bytes
Includes +1 for -n
Run with input on STDIN:
perl -nE '/^.+(?{map{say$&.$_}0..9})^/' <<< PERL

Just the code:
/^.+(?{map{say$&.$_}0..9})^/

Very nice code. I don't understand that last ^ though... It looks like it does the same job as (*FAIL), but I don't see why. Could you explain?

@Dada Yes, forcing a fail is exactly what it does. Since it matched at least 1 character from the start of the string it can't be at the start anymore so the ^ causes the match to fail which forces the regex before that to backtrack

Ok thanks. I was expecting it to work with any character that isn't in the input, but it seems to only work with ^... I mean with your example, why ,/ doesn't work, but ^/ does?

It's an implementation detail of the regex optimizer.. If you put a specific character not in the string it is smart enough to know that the regex can never match and the real regex matching is not even started. ^ is beyond the current understanding of the optimizer. Either of the two behaviours might change in the future..

Ok I get it, I thought it was something like that but wasn't sure. Thanks a lot

Haskell, 47 43 bytes
f""=[]
f x=map((x++).show)[0..9]++f(init x)

Usage example: f "IN" -> ["IN0","IN1","IN2","IN3","IN4","IN5","IN6","IN7","IN8","IN9","I0","I1","I2","I3","I4","I5","I6","I7","I8","I9"].
Simple recursive approach. Append each digit to the word and append a recursive call with last letter removed.

Pyth, 9 bytes
sM*_._QUT

A program that takes input of a quoted string on STDIN and prints a list of strings.
Try it online
How it works
sM*_._QUT  Program. Input: Q
    ._     List of prefixes of Q
   _       Reverse
       UT  Unary range up to 10, yielding [0, 1, 2, ..., 9]
  *        Cartesian product of the above two
sM         Map concatenate over the above
           Implicitly print

Pip, 12 11 bytes
Takes the word as a cmdline argument. Outputs with no separators.
Wa&Oa.,tDQa

Try it online!
Explanation:
             Implicit: a = 1st cmdline arg, t = 10
Wa           While a (i.e. while it's not the empty string)
   Oa.,t     Concatenate range(10) to a and output
               (Pip concatenates a string to a range itemwise)
  &          The output operation is &-ed to the loop condition to save on curly braces
        DQa  Dequeue from a, removing the final character on each iteration

V, 20 bytes
A0òYpó.10/0/e
$hòd

Try it online!
Since this contains unprintable characters, here is the readable format:
A0<esc>òYp<C-a>ó.10/0/e
$hòd

And here is a hexdump:
0000000: 4130 1bf2 5970 01f3 2e31 302f 302f 650a  A0..Yp...10/0/e.
0000010: 2468 f264                                $h.d

Explanation:
A0<esc>                 "Append a '0' to the input
       ò                "Recursively:
        Yp              "  Yank this line and paste it
          <C-a>         "  Increment the first number on this line
               ó        "  Substitute:
                .10     "    Any single character followed by '10'
                   /0   "    Replace it with a '0'
                     /e "    Ignore errors if this is not found
$h                      "  Move to the end of the end of this line than back one.
                        "  This makes it so the loop ends once there is only one
                        "  character on this line.
  ò                     "End the loop
   d                    "Delete a line (since we create one too many)

Floroid - 50 47 31 bytes
f=Ba:aM[a+b KbIhd]+f(a[:-1])H[]

Currently uses a similar method as @JonathanAllan uses on his second recursive method.
Could've been this if I would've implemented the cartesian product more carefully in the language: Bc:ca([c]+[c[:-a-1]KaIw(Z(c)-1)],hd).
Testcases
Input: ABC
Output: ['ABC0', 'ABC1', 'ABC2', 'ABC3', 'ABC4', 'ABC5', 'ABC6', 'ABC7', 'ABC8', 'ABC9', 'AB0', 'AB1', 'AB2', 'AB3', 'AB4', 'AB5', 'AB6', 'AB7', 'AB8', 'AB9', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9']

Input: M
Output: ['M0', 'M1', 'M2', 'M3', 'M4', 'M5', 'M6', 'M7', 'M8', 'M9']

Bash + coreutils, 54 bytes:
for i in `seq ${#1} 1`;{ printf "${1:0:i}%s " {0..9};}

Simply loops through a sequence [Length of Input,1] and during each iteration, outputs the input word to the length of current iteration value 9 times with each number in [0,9] appended to each of the 9 copies of the word. Execute it within a file and the word or words in quotes, i.e. bash A.sh "blah blah blah".

braingasm, 34 33 31 28 bytes
At its current state, braingasm is just glorified brainfuck with a few (like, 3?) extra features. I've been spending most of the development time making it as "enterprisy" as possible, instead of actually adding features...
Anyways, the following code should work with the latest development snapshot. It takes newline-less input from stdin, like $ echo -n INVALID | braingasm invalid.bg, and prints to stdout.
,[>,]#[48+10[#<[.>]<+]0,<0,]

Explanation:
,[>,]                 lay down the input on the tape
#[                    (length of input - 1) times do
  48+                   add '0' at the end of the tape
  10[                   10 times do
     #<[.>]               move to start of tape, then print the tape
     <+                   increase the number at the end of the tape
  ]                     done printing current word with 0 through 9
  0,                    erase the number by writing 0 onto it
  <0,                   likewise, remove one character
]                     done

edit: Appearantly it's OK to skip use empty string as the delimiter

(lambdabot) Haskell - 49 bytes
f q=[x++show n|x<-reverse.tail$inits q,n<-[0..9]]

Lambdabot is a IRC bot over at #haskell; it automatically imports a bunch of modules, including Data.List which is where inits live. And because a language is defined by its implementation, I can call this lambdabot haskell and not pay the bytes for the imports.
Regular Haskell:
import Data.List
f q=[x++show n|x<-reverse.tail$inits q,n<-[0..9]]

Are you sure tails works?

@Bergi, totally forgot about the imports, thanks for pointing that out :)

I didn't mean the import, I meant that it produces the wrong output: INVALID, NVALID, VALID, ALID, LID, ID, D,

@Bergi, Yikes! You're right. 8 more bytes for me then

Python 2, 53 55 bytes
+2 bytes: declaring f is necessary with recursion (as pointed out by @Destructible Watermelon)
f=lambda s:s and[s+`n`for n in range(10)]+f(s[:-1])or[]

Recurses down to the empty string (yielding an empty list), chops off a character at a time, and prepends with a list of ten of the current string with the digits 0-9 appended to each.
Test on ideone
Python 3, 54 56 bytes
f=lambda s:s and[s+n for n in'0123456789']+f(s[:-1])or[]

Test on ideone

I'm fairly sure that if your lambda includes a call to itself, you need to have the f= part (a bit like how you can't assume variables have values)

Java 7, 105 98 bytes
void c(String s){for(int x=0,l=s.length();x<l*10;)System.out.print(s.substring(0,l-x/10)+x++%10);}

-7 bytes thanks to @Poke.
Ungolfed:
void c(String s){
  for(int x = 0, l = s.length(); x < l*10; ){
    System.out.print(s.substring(0, l - x/10) + x++ % 10);
  }
}

Test code:
Try it here.
class M{
  static void c(String s){for(int x=0,l=s.length();x<l*10;)System.out.print(s.substring(0,l-x/10)+x++%10);}

  public static void main(String[] a){
    c("INVALID");
    System.out.println();
    c("MAYBE");
    System.out.println();
    c("AFTER");
    System.out.println();
    c("WHAT ARE YOU DOING");
  }
}

Output:
INVALID0INVALID1INVALID2INVALID3INVALID4INVALID5INVALID6INVALID7INVALID8INVALID9INVALID0INVALID1INVALID2INVALID3INVALID4INVALID5INVALID6INVALID7INVALID8INVALID9INVALI0INVALI1INVALI2INVALI3INVALI4INVALI5INVALI6INVALI7INVALI8INVALI9INVAL0INVAL1INVAL2INVAL3INVAL4INVAL5INVAL6INVAL7INVAL8INVAL9INVA0INVA1INVA2INVA3INVA4INVA5INVA6INVA7INVA8INVA9INV0INV1INV2INV3INV4INV5INV6INV7INV8INV9IN0IN1IN2IN3IN4IN5IN6IN7IN8IN9I0I1I2I3I4I5I6I7I8I9
MAYBE0MAYBE1MAYBE2MAYBE3MAYBE4MAYBE5MAYBE6MAYBE7MAYBE8MAYBE9MAYBE0MAYBE1MAYBE2MAYBE3MAYBE4MAYBE5MAYBE6MAYBE7MAYBE8MAYBE9MAYB0MAYB1MAYB2MAYB3MAYB4MAYB5MAYB6MAYB7MAYB8MAYB9MAY0MAY1MAY2MAY3MAY4MAY5MAY6MAY7MAY8MAY9MA0MA1MA2MA3MA4MA5MA6MA7MA8MA9M0M1M2M3M4M5M6M7M8M9
AFTER0AFTER1AFTER2AFTER3AFTER4AFTER5AFTER6AFTER7AFTER8AFTER9AFTER0AFTER1AFTER2AFTER3AFTER4AFTER5AFTER6AFTER7AFTER8AFTER9AFTE0AFTE1AFTE2AFTE3AFTE4AFTE5AFTE6AFTE7AFTE8AFTE9AFT0AFT1AFT2AFT3AFT4AFT5AFT6AFT7AFT8AFT9AF0AF1AF2AF3AF4AF5AF6AF7AF8AF9A0A1A2A3A4A5A6A7A8A9
WHAT ARE YOU DOING0WHAT ARE YOU DOING1WHAT ARE YOU DOING2WHAT ARE YOU DOING3WHAT ARE YOU DOING4WHAT ARE YOU DOING5WHAT ARE YOU DOING6WHAT ARE YOU DOING7WHAT ARE YOU DOING8WHAT ARE YOU DOING9WHAT ARE YOU DOING0WHAT ARE YOU DOING1WHAT ARE YOU DOING2WHAT ARE YOU DOING3WHAT ARE YOU DOING4WHAT ARE YOU DOING5WHAT ARE YOU DOING6WHAT ARE YOU DOING7WHAT ARE YOU DOING8WHAT ARE YOU DOING9WHAT ARE YOU DOIN0WHAT ARE YOU DOIN1WHAT ARE YOU DOIN2WHAT ARE YOU DOIN3WHAT ARE YOU DOIN4WHAT ARE YOU DOIN5WHAT ARE YOU DOIN6WHAT ARE YOU DOIN7WHAT ARE YOU DOIN8WHAT ARE YOU DOIN9WHAT ARE YOU DOI0WHAT ARE YOU DOI1WHAT ARE YOU DOI2WHAT ARE YOU DOI3WHAT ARE YOU DOI4WHAT ARE YOU DOI5WHAT ARE YOU DOI6WHAT ARE YOU DOI7WHAT ARE YOU DOI8WHAT ARE YOU DOI9WHAT ARE YOU DO0WHAT ARE YOU DO1WHAT ARE YOU DO2WHAT ARE YOU DO3WHAT ARE YOU DO4WHAT ARE YOU DO5WHAT ARE YOU DO6WHAT ARE YOU DO7WHAT ARE YOU DO8WHAT ARE YOU DO9WHAT ARE YOU D0WHAT ARE YOU D1WHAT ARE YOU D2WHAT ARE YOU D3WHAT ARE YOU D4WHAT ARE YOU D5WHAT ARE YOU D6WHAT ARE YOU D7WHAT ARE YOU D8WHAT ARE YOU D9WHAT ARE YOU 0WHAT ARE YOU 1WHAT ARE YOU 2WHAT ARE YOU 3WHAT ARE YOU 4WHAT ARE YOU 5WHAT ARE YOU 6WHAT ARE YOU 7WHAT ARE YOU 8WHAT ARE YOU 9WHAT ARE YOU0WHAT ARE YOU1WHAT ARE YOU2WHAT ARE YOU3WHAT ARE YOU4WHAT ARE YOU5WHAT ARE YOU6WHAT ARE YOU7WHAT ARE YOU8WHAT ARE YOU9WHAT ARE YO0WHAT ARE YO1WHAT ARE YO2WHAT ARE YO3WHAT ARE YO4WHAT ARE YO5WHAT ARE YO6WHAT ARE YO7WHAT ARE YO8WHAT ARE YO9WHAT ARE Y0WHAT ARE Y1WHAT ARE Y2WHAT ARE Y3WHAT ARE Y4WHAT ARE Y5WHAT ARE Y6WHAT ARE Y7WHAT ARE Y8WHAT ARE Y9WHAT ARE 0WHAT ARE 1WHAT ARE 2WHAT ARE 3WHAT ARE 4WHAT ARE 5WHAT ARE 6WHAT ARE 7WHAT ARE 8WHAT ARE 9WHAT ARE0WHAT ARE1WHAT ARE2WHAT ARE3WHAT ARE4WHAT ARE5WHAT ARE6WHAT ARE7WHAT ARE8WHAT ARE9WHAT AR0WHAT AR1WHAT AR2WHAT AR3WHAT AR4WHAT AR5WHAT AR6WHAT AR7WHAT AR8WHAT AR9WHAT A0WHAT A1WHAT A2WHAT A3WHAT A4WHAT A5WHAT A6WHAT A7WHAT A8WHAT A9WHAT 0WHAT 1WHAT 2WHAT 3WHAT 4WHAT 5WHAT 6WHAT 7WHAT 8WHAT 9WHAT0WHAT1WHAT2WHAT3WHAT4WHAT5WHAT6WHAT7WHAT8WHAT9WHA0WHA1WHA2WHA3WHA4WHA5WHA6WHA7WHA8WHA9WH0WH1WH2WH3WH4WH5WH6WH7WH8WH9W0W1W2W3W4W5W6W7W8W9

You can save 7 bytes by combining the for loops and doing some extra logic to implicitly determine the suffix and the substring. void c(String s){for(int x=0,l=s.length();x<l*10;)System.out.print(s.substring(0,l-x/10)+x++%10);}

C#, 107 102 Bytes
string f(string i){var o="";while(i!=""){for(int k=0;k<=9;)o+=i+k++;i=i.Remove(i.Length-1);}return o;}

Ungolfed
string f(string i)
{
   string o = "";
   while(i != "")
   {
      for (int k = 0; k <= 9;)
         o += i + k++;
      i = i.Remove(i.Length - 1);
   }
   return o;
}

You can golf it a bit by removing k++ in the for-loop and add ++ after the usage of k, so like this: string f(string i){var o="";while(i!=""){for(int k=0;k<=9;)o+=i+k+++",";i=i.Remove(i.Length-1);}return o;} Also, the comma's aren't required by OP's challenge, although if you prefer you can of course keep them. Without it's this: string f(string i){var o="";while(i!=""){for(int k=0;k<=9;)o+=i+k++;i=i.Remove(i.Length-1);}return o;}

Haskell, 49 46 bytes
f=(>>=(<$>['0'..'9']).snoc).reverse.tail.inits

You can save a byte by infixing the map f=(>>=(map['0'..'9']).snoc).tail.reverse.inits. 3 by using fmap: f=(>>=(<$>['0'..'9']).snoc).tail.reverse.inits

Oh, and if you do reverse.tail.inits instead of tail.reverse.inits you also get the correct output ;)

@BlackCap: Thanks, I really wondered why there is no flipped (f)map in the standard library, but didn't think of sections. Regarding tail, I guess I meant init, but swapping it with reverse works fine either :-)

Dyalog APL, 14 11 bytes
Returns list of strings.
,⎕D∘.,⍨⌽,\⍞

, listify (make table into list)
⎕D all digits
∘.,⍨ appended to all of (i.e. making all combinations with)
⌽ the reversed list of
,\ the cumulative concatenation of
⍞ the text input
TryAPL online!

Fixed. I use a boilerplate and forgot to fill it in.

Perl 6, 32 = 31 bytes + 1 for -p
I'm not all that proficient with Perl 6, so there may be ways to reduce it even more.
$_= ~((~$_,*.chop...^!*)X~ ^10)

It uses -p to evaluate once for each input line. The line is placed into $_ and after the program runs, it prints $_.
The (~$_,*.chop...^!*) is a list where the first element is stringified (~) input, each subsequent element is obtained by chopping the last character off the previous one (*.chop) and that continues until the string is empty (!*), excluding the empty string case (the ^ in ...^).
X~ generates all pairs of the lists on the left and right, using the specified operation, in this case, the string concatenation (~) on them. ^10 is a list of 0, 1, ... 9.
Finally, the list is stringified again with ~, giving the required words with space as a separator.

Swift 3, 150 Bytes
Not quite the shortest solution, but not terrible for Swift
func a(s: String){var c=s.characters,r="";while(c.count>0){var k = "";for d in c{k+=String(d)};for i in 0...9{r+="\(k)\(i) "};c.removeLast()};print(r);}

Test this online in the IBM Swift Sandbox
Ungolfed
func a(s s: String){
    var c = s.characters, r = ""
    while(c.count > 0){
        var k = ""
        for d in c{
            k+=String(d)
        }
        for i in 0...9{
            r+="\(k)\(i) "
        }
        c.removeLast()
    }
    print(r)
}

Batch, 85 83 bytes
@for /l %%i in (0,1,9)do @echo %1%%i
@set s=%1
@if not "%s:~,-1%"=="" %0 %s:~,-1%

Ruby, 90 85 bytes
f=->s{if s=="";return[];end;(0..9).map{|i|s+i.to_s}+f[s.chars.take(s.length-1).join]}

If the string is empty, return a empty array. Otherwise, generate the string + the number in each number from 0 to 9, and call f with the string without the last character.
Saved 5 bytes thanks to @LevelRiverSt

I take it you haven't golfed in Ruby before. Check my answer to this question (or many other Ruby answers on this site) to see the golfy way to define a function without including those wasteful def and end. You can make a lambda so you don't even have do give it a name, so long as you assign to a variable and call it with the arguments in square brackets.

@LevelRiverSt Using a lambda is 1 byte longer

Ok, I missed the fact that you do need to name it because it's recursive. But still f=->s{if s=="";return[];end;(0..9).map{|i|s+i.to_s}+f[s.chars.take(s.length-1).join]} is 5 bytes shorter.

@LevelRiverSt Oh, I didn't know about the -> syntax

f=->s{s==""&&(return[]);(0..9).map{|i|s+i.to_s}+f[s.chars.take(s.length-1).join]} saves another 4 bytes. Ruby evaluates boolean expressions from left to right and does not evaluate later terms unless necessary to determine the result. The same golfing technique can be used in C. I don't know why the () around return[] are required in this case.

Ruby, 51
No separator used.
->s{(10*n=s.size).times{|i|print s[0,n-i/10],i%10}}

Add the following after i%10 for separators:
,$/ for newline, ,?| for |  (similar for any printable character), ,' ' for space.
In test program
f=->s{(10*n=s.size).times{|i|print s[0,n-i/10],i%10}}

f[gets.chomp]

PHP, 64 56 bytes
for($i=9;$a=substr($argv[1].a,0,-++$i/10);)echo$a.$i%10;

for(;$a=substr($argv[1].a,$i=0,-++$l);)for(;$i<10;)echo $a.$i++;

Nice way of preventing another for-loop. You can save a byte by removing the space after echo

PowerShell v2+, 60 bytes
param($n)$n.length..1|%{$i=$_-1;0..9|%{-join$n[0..$i]+"$_"}}

Loops from the length of the input string down to 1. Each iteration, set helper $i equal to the current number minus 1. This is necessary because .length is the total number of characters, but indexing a string is 0-based. Then, we loop from 0 to 9. Each inner loop, slice the input string $n based on the value of our outer loop, -join it back into a string, and string-concatenate on the inner loop count. Each individual loop result is placed on the pipeline, and output is implicit at program completion.
PS C:\Tools\Scripts\golfing> .\invalid-invali-inval.ps1 'foo'
foo0
foo1
foo2
foo3
foo4
foo5
foo6
foo7
foo8
foo9
fo0
fo1
fo2
fo3
fo4
fo5
fo6
fo7
fo8
fo9
f0
f1
f2
f3
f4
f5
f6
f7
f8
f9

Groovy (58 Bytes)
No idea why I'm even bothering to post a Groovy answer... The minimum required size for a Groovy golf is 2 based on needing a closure, so the best answer here is double my minimum size.
   {s->(s.length()-1..0).each{c->10.times{print s[0..c]+it}}}

Try it here: https://groovyconsole.appspot.com/script/5148433803378688

Python 3, 62 bytes
lambda x:[(x+" ")[:~i//10]+str(i%10)for i in range(len(x)*10)]

Doesn't use recursion like the other answer.
The reason the " " in x+" " is there: -0 is still zero, and so we can't use minus notation to get all of the string in this way so the highest we can go is minus one, so the " " is to pad the string,

C, 72, 70 bytes
j;F(char*s,int l){while(l--)for(j=0;j<10;)printf("%.*s%d",l+1,s,j++);}

Takes strings as pointer/size pairs. Test main:
int main() {
  F("INVALID", 7); putchar('\n');
  F("MAYBE", 5); putchar('\n');
  F("AFTER", 5); putchar('\n');
  F("WHAT ARE YOU DOING", 18); putchar('\n');
}

Retina, 37 bytes
Byte count assumes ISO 8859-1 encoding.
M&!r`.+
m`$
0
%{`$
¶$%`
T`w`d`.$
G10`

Try it online!
Explanation
M&!r`.+

Get all prefixes of the input by matching and printing all overlapping matches from the right.
m`$
0

Append a 0 to each line.
%{`$
¶$%`

The { indicates that the remaining three stages are executed in a loop until they fail to change the string. The % says that they should be applied to each line separately.
The stage itself simply duplicates the last line (initially this is just the line this is run on, but each iteration of the three stages adds another line).
T`w`d`.$

Increment the digit in the last row by performing the following character substitution:
from: _0123456789AB...
to:   0123456789

And finally:
G10`

Keep only the first 10 lines, so that we remove the line we just added after INPUT9.

Racket 113 bytes
(λ(s)(let((n(string-length s)))(for*/list((i n)(j 10))(string-append(substring s 0(- n i))(number->string j)))))

More readable form:
(define(f s)
  (let ((n (string-length s)))
  (for*/list ((i n)(j 10))
    (string-append
     (substring s 0(- n i))
     (number->string j)))))

Usage:
(f "Invalid")
'("Invalid0"
  "Invalid1"
  "Invalid2"
  "Invalid3"
  "Invalid4"
  "Invalid5"
  "Invalid6"
  "Invalid7"
  "Invalid8"
  "Invalid9"
  "Invali0"
  "Invali1"
  "Invali2"
  "Invali3"
  "Invali4"
  "Invali5"
  "Invali6"
  "Invali7"
  "Invali8"
  "Invali9"
  "Inval0"
  "Inval1"
  "Inval2"
  "Inval3"
  "Inval4"
  "Inval5"
  "Inval6"
  "Inval7"
  "Inval8"
  "Inval9"
  "Inva0"
  "Inva1"
  "Inva2"
  "Inva3"
  "Inva4"
  "Inva5"
  "Inva6"
  "Inva7"
  "Inva8"
  "Inva9"
  "Inv0"
  "Inv1"
  "Inv2"
  "Inv3"
  "Inv4"
  "Inv5"
  "Inv6"
  "Inv7"
  "Inv8"
  "Inv9"
  "In0"
  "In1"
  "In2"
  "In3"
  "In4"
  "In5"
  "In6"
  "In7"
  "In8"
  "In9"
  "I0"
  "I1"
  "I2"
  "I3"
  "I4"
  "I5"
  "I6"
  "I7"
  "I8"
  "I9")

Do you need all of the newlines?

I mean in the source code. I presume the code is not a list.

I have removed the newlines and reduced the bytes. Thanks.

Scala, 73 70 bytes
def g(s:String):String=if(s=="")""else(0 to 9 flatMap(s+_))++g(s.init)

Call it like f("INVALID").
Returns a Sequence of Chars.
Explanation
def g(s:String):String= //defines a method g taking a String as a parameter
                        //and returning a String
if(s=="")""             //guard to prevent infinite recursion
else
    (0 to 9             //create a Range from 0 to 9 (inclusive)
    flatMap(            //map:
        s+_                 //append each number to the string
    ))                  //and flatten
    ++ g(s.init)        //concatenate with g applied to everything but the last element of s

Alternative solution, 73 bytes
(s:String)=>s.scanLeft("")(_+_).tail.reverse.flatMap(x=>(0 to 9)map(x+_))

defines an anonymous function. To call it, write
val f = ...

and call it like this
f("INVALID")

It returns a sequence of strings, which will look like this when printed:
Vector(INVALID0, INVALID1, INVALID2, INVALID3, INVALID4, INVALID5, INVALID6, INVALID7, INVALID8, INVALID9, INVALI0, INVALI1, INVALI2, INVALI3, INVALI4, INVALI5, INVALI6, INVALI7, INVALI8, INVALI9, INVAL0, INVAL1, INVAL2, INVAL3, INVAL4, INVAL5, INVAL6, INVAL7, INVAL8, INVAL9, INVA0, INVA1, INVA2, INVA3, INVA4, INVA5, INVA6, INVA7, INVA8, INVA9, INV0, INV1, INV2, INV3, INV4, INV5, INV6, INV7, INV8, INV9, IN0, IN1, IN2, IN3, IN4, IN5, IN6, IN7, IN8, IN9, I0, I1, I2, I3, I4, I5, I6, I7, I8, I9)

Explanation
s.scanLeft("")(_+_)    //accumulate letters from left to right -> Vector("", "I", "IN", "INV", "INVA", "INVAL", "INVALI", "INVALID")
.tail                  //drop the first element
.reverse               //reverse it
.flatMap(x =>          //map each element called x
    (0 to 9)           //create a Range from 0 to 9 (inclusive)
    map(x+_)           //append each number to x
)                      //and flatten

Your recursive solution is 3 bytes less than the iterative one

You're right, I must've optimised it after counting.

CJam, 29 28 bytes
ls_,,:)W%]~{_[X<aA*A,]zo}fX;

Explanation:
ls                              read input as string
  _                             duplicate input
   ,,                           create range of length input
      :)W%]                     add 1 to all elements and reverse
           ~                    dump array on stack
            {            }fX    for loop
             _                  duplicate input string
              [X<aA*            slice input string and multiply by 10
                    A,]         range(10)
                       zo       zip array and print (no separator)
                            ;   clear stack

Try it online

sed 107
s/$/HH/;:;s/..$/0/p;s/.$/1/p;s/.$/2/p;s/.$/3/p;s/.$/4/p
s/.$/5/p;s/.$/6/p;s/.$/7/p;s/.$/8/p;s/.$/9/p;/.../b

Brainf*ck, 217 bytes
>,[>,----------[++++++++++>]<]>++++++++[<++++++>-]>++++++++++[>+>+<<-]>>[<<+>>-]<<[-<<[<]>[.>]<+>>>.<>>[-]+<<[>>-]<[<]>>>[[-]<<++++++++++<<----------<[-]<[[>+<-]<]>>[>]>>>[-]+<<<<<[>>>>>[-]]>[[>]>>>>]<[<<[-]>>[-]]]<<]

Not really a competitive entry, I just wanted to see if I could do it. Not a trivial brainf*ck program! Nested conditionals and all. It prints the output separated by newlines instead of comma, space. Here's my annotated version:
[
    We'll have a string in the first n positions on the tape.
    One after the end of the string, we'll put a 48 '0' and do a loop adding
    1 to it 9 times, then loop back and delete the last letter of the string.
]

>,[>,----------[++++++++++>]<]
[Read line of input and leave a 0 at the beginning to navigate back.]

>++++++++[<++++++>-]
>++++++++++[>+>+<<-]>>[<<+>>-]<<    we have {string} {48} {0} {10} {10}

Now we should have {string} {48} {0} {9}

[
    -<<[<]
    >[.>]
    <+>>>.<   printed out string and we're at the cell 3 past the end
    >>[-]+   put a 1 in the cell 2 to the right of this
    <<[>>-]  clear that cell if this one is not zero
    <[<]        sets us at the cell 2 after the end of the string (0)

    >>>
    [         If the cell we flagged is still flagged we counted all the way up
              to 9
        [-]   Clear the flag
        <<++++++++++        Add 10 back to the cell 3 off end of string
        <<----------        subtract 10 to get 48 in the last cell of string
                            again
        <[-]                Clear last cell in string

        <[[>+<-]<]
        [copy cells into the next one all the way down; entire string has been
         moved up one place now.]

        >>[>]     seek back to end of string
        >>>[-]+<<<<<    set a flag in the cell three after this (unused)
        [>>>>>[-]]      if there is a letter left clear the flag
        >[[>]>>>>]<     this line puts us at the cell with the flag no matter
                        what we did at the last line

        [               If the flag is set we're all out of string
            <<[-]>>[-]  Clear the 3rd cell past the end and the flag; pointer is
                        at the flag cell like it would have been if we never
                        entered the loop
        ]
    ]
    <<                  Puts us at the cell 3 after the end
]

Input is the string followed by optionally a newline (output is prettier) and then EOF.

Vyxal, 7 bytes
¦₀ʁv+Ṙf

Try it Online!
¦       # Prefixes
   v+   # To each append
 ₀ʁ     # 0...9
     Ṙf # Reverse and flatten

Note: using the = flag decreases the byte count.

@TheEmptyStringPhotographer You've been asked not to Vyncode old answers multiple times. Please stop.

No, this is the second time.

Factor, 74 bytes
[ head-clump reverse 10 repeat [ 10 mod number>string append ] map-index ]
Attempt This Online!

Thunno 2, 6 bytes
ƒrıTL+

Try it online!
Explanation
ƒrıTL+  # Implicit input
ƒr      # Reversed prefixes
  ı     # Map:
   TL   #  Push [0..9]
     +  #  Concatenate
        # Implicit output

Uiua (0.0.18), 56 bytes
;⊞(0&p⊂⊔)⇌∺(□↙∶)∶+1⇡⧻.∶+@0⇡10

Try it online!
Explanation:
                      ∶+@0⇡10  # create the string "0123456789" and put it below input
                 +1⇡⧻.         # create a range from 1 to the length of input, inclusive
          ∺(□↙∶)∶              # for each item in the range, take that many chars of input
 ⊞(     )⇌                     # for each possible (input_prefix, digit) pair,
   0&p⊂⊔                       # join them, print them, and then push a dummy value
;                              # pop the table of dummy values so it isn't printed

Uiua, 18 bytes
♭⊠⍜⊔$"__"∶⇡10⇌\⍜⊔⊂

Try it!
♭⊠⍜⊔$"__"∶⇡10⇌\⍜⊔⊂
             ⇌\⍜⊔⊂  # reversed prefixes
          ⇡10       # 0..9
         :          # flip
 ⊠⍜⊔$"__"           # join each combination of pairs to a string
♭                   # deshape

Clojure, 68 bytes
#(for[i(reverse(range(count %)))j(range 10)](str(subs % 0(inc i))j))

Plain boring for, couldn't make it shorter by (iterate butlast %) or others :/

R, 72 bytes
Reads input from stdin and returns an R-vector of the desired output:
unname(unlist(lapply(Map(substr,x<-scan(,""),1,nchar(x):1),paste0,0:9)))

Example output for input hello:

 [1] "hello0" "hello1" "hello2" "hello3" "hello4" "hello5" "hello6" "hello7" "hello8" "hello9"
[11] "hell0"  "hell1"  "hell2"  "hell3"  "hell4"  "hell5"  "hell6"  "hell7"  "hell8"  "hell9"
[21] "hel0"   "hel1"   "hel2"   "hel3"   "hel4"   "hel5"   "hel6"   "hel7"   "hel8"   "hel9"
[31] "he0"    "he1"    "he2"    "he3"    "he4"    "he5"    "he6"    "he7"    "he8"    "he9"
[41] "h0"     "h1"     "h2"     "h3"     "h4"     "h5"     "h6"     "h7"     "h8"     "h9"

Perl 6, 17 bytes
{m:ex/^.+/X~ ^10}

Try it online!
How it works:
{               }  # A lambda
 m   /   /          # Apply a regex to the lambda argument,
      ^.+           #   matching prefixes of the string,
  :ex               #   with exhaustive matching (i.e. *all* possible prefixes).
             ^10    # Range from 0 to 9.
          X~        # Take the Cartesian product, and concatenate each result.

In case returning a list is not acceptable, this 20 byte version returns a space-separated string:
{~(m:ex/^.+/X~ ^10)}

Python 3, 76 73 bytes
s=input()
for i in range(len(s),0,-1):
 for j in range(10):print(s[:i],j)

Try it online!

You can get rid of the newline and tab in the second for loop.  for j in range(10): print(s[:i],j)

Retina, 28 bytes
Thanks to Martin for helping make it valid.
$
0
;{:G`
(?<=.).9
#
}T`#d`d

Try it online

Python 2, 84 Bytes
Ah, the old nested merged list generator lambda-roo
c="".join
lambda s:c([c([s[:l]+`i`for i in range(10)])for l in range(len(s),0,-1)])

Ruby -n, 37 36 bytes
-n enables automatically reading input in a loop. $_ stores the last line of input. Trailing newline is required.
chop is a function that's only available in -n or -p mode, which is equivalent to $_.chop! normally (it removes the last character from $_ and returns the new value).
Conveniently for this problem, Ruby reads in the newline at the end of each line of input if -l is not specified, which allows the first chop in the loop to take it out instead of messing with the "actual" input.
puts (?0..?9).map{$_+_1}while''<chop

Attempt This Online!


text:
Slowly turn a string into another
The Challenge
Given two strings/an array of strings, output the first string slowly shrinking and expanding back into the second string.
You can assume the strings will always start with the same character.
Example
Input:
"Test", "Testing"

Output:
Test
Tes
Te
T
Te
Tes
Test
Testi
Testin
Testing

First you output the first word:
Test

Then you keep removing one letter until the string is one character long:
Tes
Te
T

Then keep adding one letter of the second word until it's done:
Te
Tes
Test
Testi
Testin
Testing

(if both strings are one character long, then just output one of them once.)
Test Cases
"Hello!", "Hi."
Hello!
Hello
Hell
Hel
He
H
Hi
Hi.

"O", "O"

O

"z", "zz"

z
zz

".vimrc", ".minecraft"

.vimrc
.vimr
.vim
.vi
.v
.
.m
.mi
.min
.mine
.minec
.minecr
.minecra
.minecraf
.minecraft

"     ", "   "

SSSSS
SSSS
SSS
SS
S
SS
SSS

"0123456789", "02468"

0123456789
012345678
01234567
0123456
012345
01234
0123
012
01
0
02
024
0246
02468

(note: on the space/fourth test case, replace the S with spaces)
Rules

This is code-golf, so shortest answer in bytes wins! Tiebreaker is most upvoted post. Winner will be chosen on 09/10/2016.
Standard loopholes are forbidden.

Will 2 trailing newlines (one visible empty line after the sequence) be allowed or not?

Pyth, 9 bytes
j+_._Et._

A program that takes the second string, and then the first string, as quoted strings on STDIN and prints the result.
Try it online
How it works
j+_._Et._  Program. Inputs: Q, E
   ._E     Yield prefixes of E as a list
  _        Reverse the above
       ._  Yield prefixes of Q as a list (implicit input fill)
      t    All but the first element of above
 +         Merge the two lists
j          Join on newlines
           Implicitly print

V, 14 bytes
òYp$xhòjòÄ$xhh

Try it online!
Explanation:
ò     ò     "Recursively:
 Yp         "  Yank the current line and paste it
   $        "  Move to the end of the current line
    x       "  Delete one character
     h      "  Move One character to the right.
            "  Because of the way loops work in V, this will throw an error if there
            "  Is only one character on the current line.

Now, the buffer looks like this:
0123456789
012345678
01234567
0123456
012345
01234
0123
012
01
0

We just need to do the same thing in reverse for the next line:
j           "Move down one line
 ò     ò    "Recursively (The second ò is implicit)
  Ä         "  Duplicate this line up
   $        "  Move to the end of the current line
    x       "  Delete one character
     hh     "  Move two characters to the right.
            "  Because of the way loops work in V, this will throw an error if there
            "  Is only two characters on the current line.

More interesting alternate solution:
òÄ$xhòç^/:m0
ddGp@qd

It is like vim is always correct tool for job

@Downgoat Exactly. That's why you need to start golfing in V. :P

Python, 93 bytes
f=lambda a,b,r='',i=2:a and f(a[:-1],b,r+a+'\n')or(len(b)>=i and f(a,b,r+b[:i]+'\n',i+1)or r)

Starts with the empty string r, adds a and a newline and removes the last character from a until a is empty then adds the required portions of b and a newline by keeping a counter, i, which starts at 2 until the length of b is exceeded, then returns r. Has a trailing newline.
All tests are on ideone

2 things. 1) I believe that you miscounted characters and it is actually 93 and 2) You don't need to say r="". Simple r would still work.

Thanks @JackBates. 1. Correct, and updated - I probably forgot the f=. 2. Without the r='' present f('test','testing') would not work; yes f('test','testing','') would, but we must follow the specifications.

Forgive me. I was just looking at the code and not the examples.

Retina, 50 41 26 bytes
Thanks to Martin Ender for saving 15(!) bytes.
M&!r`.+
Om`^.¶[^·]+|.+
A1`

Takes input with the two strings separated by a newline:
Test
Testing

Try it online!
Explanation
M&!r`.+

The first line generates the "steps" of both words:
Testing
Testin
Testi
Test
Tes
Te
T
Test
Tes
Te
T

M is for match mode, & considers overlapping matches, and ! prints the matches instead of the number of them. The reason it's reversed is the right-to-left option: the engine starts looking for matches at the end of the string and continues toward the beginning.
Om`^.¶[^·]+|.+

This gets everything in the right order: it sOrts all matches of the subsequent regex: A character on its own line and every character (including newlines) after it, which matches the whole second half as one chunk, or otherwise a line of characters, which matches each individual line. These matches are then sorted by code point, so the T followed by the newline goes first, followed by the lines, ascending by length.
A1`

Now we just have that first character line on top so we use Antigrep mode to discard the first match of the default regex .+.
Old version
M&!r`.+
O`\G..+¶
s`(.*)¶.¶(.*)
$2¶$1
¶.$

Try this version online!
Explanation
The first line is the same, so see the explanation for that above.
O`\G..+¶

This reverses the lines of the first half (second input word). It actually sOrts the lines, and the regex limits the matches: it must be a line of two or more characters (..+) followed by a newline (¶) that begins where the last one left off (\G). In the above example, the single T in the middle doesn't match, so nothing after it can.
Te
Tes
Test
Testi
Testin
Testing
T
Test
Tes
Te
T

Now we have the right two components, but in the wrong order.
s`(.*)¶.¶(.*)
$2¶$1

¶.¶ matches the lone T in the middle, which we don't need but separates the two parts. The two (.*) capture everything before and after, including newlines thanks to single-line mode. The two captures are substituted in the right order with a newline in between.
Now we're done, unless the input strings are one character long, in which case the input hasn't changed. To get rid of the duplicate, we replace ¶.$ (when the last line of the string a single character) with nothing.

05AB1E, 9 bytes
.pRI.p¦«»

Explanation
.pR           # prefixes of first word
     I.p       # prefixes of second word
         ¦       # remove first prefix
          «     # concatenate
           »    # join with newlines

Try it online!

C (gcc), 102 97 95 93 bytes
n;f(char*a,char*b){for(n=strlen(a);n;puts(a))a[n--]=0;for(a=b+1;*a++;*a=n)n=*a,*a=0,puts(b);}

Try it online!
The first loop overwrites the string with 0 bytes starting from the end, and uses puts() to print the string. The second loop can't just overwrite from the beginning, it has to store the old value so it can put it back; the 0 byte is just walking towards the end.
Thanks to @homersimpson and @ceilingcat for each shaving off 2 bytes!

You can save a couple bytes by declaring n as a global int like: n;f(char*a,char*b){n=strlen(a).... And you can probably do n=*a=0 as a chained assignment in the body of your for loop.

Thanks @homersimpson. But n=*a=0 is not the same as n=*a,*a=0.

Python 2, 88 82 bytes
x,y=input(),input()
for i in x:print x;x=x[:-1]
s=y[0]
for i in y[1:]:s+=i;print s

Takes two inputs, each surrounded by quotes.
Thanks @JonathanAllan for saving some bytes and pointing out a bug.

No need for the len(x) in x=x[:len(x)-1] since negative offset slicing works - you can just write x=x[:-1]. Only problem is your code wont handle the "     ", "   " test case very well.

You can drop the second input() and use an input format like "<str1>", "<str2>"

You could change the second line to for i in range(x):print x[-i:], and the fourth line to for i in range(1,y):print y[:-i]. Not sure it would work, though.

Perl, 34 28 bytes
Includes +2 for -0n
Run with the strings on separate lines on STDIN:
perl -M5.010 -0n slow.pl
Test
Testing
^D

slow.pl:
/(^..+|
\K.+?)(?{say$&})^/

Let regex backtracking do the work...

GNU sed, 57 45 + 2(rn flags) = 47 bytes
:;1{/../p};2G;2h;s/.(\n.*)?$//;/./t;g;s/.$//p

Run:
echo -e "Test\nTesting" | sed -rnf morphing_string.sed

The input should be the two strings separated by a newline. The code is run by sed for each line.
The loop : deletes one character from the end of the string iteratively. The output related to the first string is printed directly, except the first character: 1{/../p}. The output for the second string is stored in hold space in reverse order (2G;2h) during deletion and printed at the end.

Python 3, 104 bytes
Meh.
n='\n';lambda x,y:x+n+n.join(x[:-i]for i in range(1,len(x)-1))+n+n.join(y[:i]for i in range(1,len(y)+1))

Thanks to @DJMcMayhem for golfing 21 bytes off.
Ideone it!

You can take 5 bytes of if you do n='\n' and use n instead of '\n'. You could take another 8 off if you used a lambda instead of printing: n='\n';lambda x,y:n.join(x+n+n.join(x[:-i]for i in range(1,len(x)-1))+n+n.join(y[:i]for i in range(1,len(y)+1)))

Javascript, 103 81 bytes
f=(x,y,n=1)=>x?`
`+x+f(x.slice(0,-1),y):n++<y.length?`
`+y.slice(0,n)+f(x,y,n):''

Example: f("Test", "Testing")
Output:
Test
Tes
Te
T
Te
Tes
Test
Testi
Testin
Testing

Original answer
f=(x,y,n=1)=>x?(console.log(x),f(x.slice(0,-1),y)):n++<y.length?(console.log(y.slice(0,n)),f(x,y,n)):''

Cheddar, 76 bytes
(a,b,q=s->(|>s.len).map((_,i)->s.head(i+1)))->(q(a).rev+q(b).slice(1)).vfuse

A bit longer than I'd liked. I'll add an explanation soon
Try it online!

What does |> do?

@Cyoce unary |> is range [0,n) binary is [a,b]

Brachylog, 32 bytes
:1aLtT,Lhbr:Tc~@nw
:2fb
~c[A:B]h

Try it online!
Explanation
Brachylog has no prefix built-in, therefore we will get the prefixes by using concatenate (See predicate 2): a prefix of S is P if P concatenated to Q (whatever it is) results in S.

Main predicate:
:1aL                  L is all prefixes of both elements of the input (see predicate 1)
   LtT,               T is the second element of L
       Lhbr           Remove the first prefix of the first list of L and reverse it
           :Tc        Concatenate with T
              ~@n     Join with newlines
                 w    Write to STDOUT

Predicate 1:
:2f                   Find all prefixes of the input string (see predicate 2)
   b                  Remove the first one (empty string)

Predicate 2:
~c[A:B]               Input is the result of concatenating A to B
       h              Output is A

Pyke, 14 bytes
VDO)KKQlFh<)_X

Try it here!
And 17 bytes just because it's an awesome solution:
mVDO)Fto!I_O(RKsX

Try it here!

Java, 188 179 bytes
interface E{static void main(String[]a){int i=a[0].length();while(i>1)System.out.println(a[0].substring(0,i--));while(i<=a[1].length())System.out.println(a[1].substring(0,i++));}}

Update

Removed s variable, saved 9 bytes

Ungolfed:
interface E {

    static void main(String[] a) {
        int i = a[0].length();
        while (i > 1) {
            System.out.println(a[0].substring(0, i--));
        }
        while (i <= a[1].length()) {
            System.out.println(a[1].substring(0, i++));
        }
    }
}

Usage:
$ java E 'test' 'testing'
test
tes
te
t
te
tes
test
testi
testin
testing

Haskell, 54 53 47 bytes
t[]=[]
t x=x:t(init x)
(.reverse.t).(++).init.t

Usage example: ((.reverse.t).(++).init.t) "Hello" "Hi!" -> ["Hello","Hell","Hel","He","H","Hi","Hi!"].
Some pointfree magic. It's the same as f x y = (init(t x))++reverse (t y) where t makes a list of all initial substrings e.g. t "HI!" -> ["H","HI","HI!"].

Hm, t=reverse.tail.inits?

@Bergi: sure, but inits needs import Data.List.

Dyalog APL, 20 13 bytes
↑(⌽,\⍞),1↓,\⍞

↑ matrify
(⌽,\⍞) reversed (⌽) cumulative concatenation (,\) of character input (⍞)
, prepended to
1↓ one element dropped from
,\⍞ cumulative concatenation of character input
TryAPL online!

Floroid, 69 bytes
a,b=L.J
c=1
NZ(a)!=1:z(a);a=a[:-1]
z(a)
NZ(a)!=Z(b):c+=1;a=b[:c];z(a)

It's a start. Takes the input from STDIN.
Testcases
Input: Test Testing
Output:
Test
Tes
Te
T
Te
Tes
Test
Testi
Testin
Testing

Input: O O
Output: O

REPL/Javascript, 109 Bytes
Uses false string to whittle down the original string
Abuses substring with larger numbers to grow the second one, stops when its about to print the same word as last time.
(a,b)=>{l=console.log;z='substring';for(c=a.length;d=a[z](0,c--);){l(d)}for(c=2;d!=(n=b[z](0,c++));){l(d=n)}}

Demo:
> ((a,b)=>{l=console.log;z='substring';for(c=a.length;d=a[z](0,c--);){l(d)}for(c=2;d!=(n=b[z](0,c++));){l(d=n)}})("asdf","abcd")
[Log] asdf
[Log] asd
[Log] as
[Log] a
[Log] ab
[Log] abc
[Log] abcd

it's 1 byte shorter to do a=>b=>... and call the function with (a)(b)

Racket 193 bytes
(define(f l)
(let*((s(list-ref l 0))
(x(string-length s)))
(for((n x))
(println(substring s 0(- x n))))
(set! s(list-ref l 1))
(for((n(range 1(string-length s))))
(println(substring s 0(add1 n))))))

Testing:
(f(list "Test" "Testing"))

"Test"
"Tes"
"Te"
"T"
"Te"
"Tes"
"Test"
"Testi"
"Testin"
"Testing"

(f(list "Hello!" "Hi."))

"Hello!"
"Hello"
"Hell"
"Hel"
"He"
"H"
"Hi"
"Hi."

It should delete last character from input string, not the first one.

Brainfuck, 38 55 bytes
>++++++++++>,[>,]<[<]>>[[.>]<[-]<[<]>.>],.[[<]>.>[.>],]

Edit: included newlines in output

I can't get your code to work. Is the input separated by a new line? Which interpreter are you using?

Husk, 7 bytes
+↔ḣ²tḣ⁰

Try it online!

Canvas, 8 bytes
［］↕ｋ；［］∔

Try it here!
Explanation:
[]↕k;[]+ | Full program (characters replaced for clean formatting)
---------+--------------------------------------------------------
[]       | Prefixes of first input
  ↕      | Reversed
   k     | Remove the last item
    ;    | Swap (places the second input on top)
     []  | Prefixes of second input
       + | Add vertically

Thunno 2 N, 6 bytes
€ƒẸrsḥ

Try it online!
Takes inputs in reverse order.
Explanation
€ƒẸrsḥ  # Implicit input
€ƒ      # Prefixes of each
  Ẹr    # Dump and reverse
    sḥ  # Swap and concatenate
        # Implicit output

Java, 168 136 bytes
(s,d)->{int i=s.length()+1;while(i-->1)System.out.println(s.substring(0,i));while(i++<d.length())System.out.println(d.substring(0,i));};

Ungolfed test program
public static void main(String[] args) {

    BiConsumer<String, String> biconsumer = (s, d) -> {
        int i = s.length() + 1;
        while (i-- > 1) {
            System.out.println(s.substring(0, i));
        }
        while (i++ < d.length()) {
            System.out.println(d.substring(0, i));
        }
    };

    biconsumer.accept("Test", "Testing123");

}

C, 100 bytes
n;f(char*c,char*s){n=strlen(c);while(n)printf("%.*s\n",n--,c);for(n=1;s[n++];)printf("%.*s\n",n,s);}

Ungolfed test
#include <stdio.h>
#include <string.h>
n;
f(char*c,char*s)
{
    n=strlen(c);
    while(n)
        printf("%.*s\n",n--,c);
    for(n=1;s[n++];)
        printf("%.*s\n",n,s);
}

int main(void)
{
    char * s1 = "Test";
    char * s2 = "Testing";
    f(s1, s2);
    return 0;
}

The shared part of two words is not always 1-char long.

But shrinking ends and expanding begins from the first common character

Several places to save a few bytes. Make n global to make it int implicitly. Convert first while to for and move n=strlen(c) into it to drop a semicolon. Replace second do-while with another for and change logic like this: for(n=1;s[n++];)printf("%.*s\n",n,s); I've got it down to 99 bytes using similar code.

@aragaer Thanks for advice

PHP, 117 109 bytes
for($i=strlen($a=$argv[1]);$i>1;)echo" ".substr($a,0,$i--);
for(;$j<strlen($b=$argv[2]);)echo" ".$c.=$b[$j++];

for($i=strlen($a=$argv[1]);$i>1;)echo substr($a,0,$i--)." ";
for(;$i<=strlen($b=$argv[2]);)echo substr($b,0,$i++)." ";

PHP, 107 bytes (not working with strings containing 0)
for($a=$argv[1];$a[$i];)echo substr($a.a,0,-++$i)." ";
for($b=$argv[2];$b[$j];)echo substr($b,0,++$j+1)." ";

C#, 129 bytes
void f(string i, string j){for(int k=i.Length,l=0;i!=j;){Console.Write(i+'\n');i=k>1?i.Remove(--k):i+j[k+l++];}Console.Write(i);}

Ungolfed
void f(string i, string j)
{
   for (int k = i.Length, l = 0; i != j; )
   {
      Console.Write(i+'\n');
      i = k > 1 ? i.Remove(--k) : i + j[k + l++];
   }
   Console.Write(i);
}

C++, 120 bytes
[](string s,string t){int n=s.length(),k=t.length(),l=n,j=0;s+=t;while(n?n:++j<k)cout<<s.substr(n?0:l,n?n--:1+j)<<endl;}

Ungolfed test
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
    string s1 = "Test";
    string s2 = "Testing";
    auto f = [](string s, string t)
    {
        int n = s.length(),
            k = t.length(),
            l = n,
            j = 0;
        s += t;
        while (n?n:++j<k)
            cout << s.substr( n?0:l, n?n--:1+j) << endl;
    };
    f(s1, s2);
    return 0;
}

(Lambdabot) Haskell - 41 bytes
f=(.drop 2.inits).(++).reverse.tail.inits

More readable, but two bytes longer:
a!b=(reverse.tail$inits a)++drop 2(inits b)

Output:
f "Hello" "Hi!"
["Hello","Hell","Hel","He","H","Hi","Hi!"]

J, 18 bytes
]\@],~[:}:[:|.]\@[

Ungolfed:
]\@] ,~ [: }: [: |. ]\@[

This is a 7-train:
]\@] ,~ ([: }: ([: |. ]\@[))

The innermost train [: |. ]\@[ consists of a cap [: on the left, so we apply |. (reverse) to the result of ]\@[, which is ]\ (prefixes) over [ (left argument).
Here's what that looks like on the testing, test input:
   'testing' ([: |. ]\@]) 'test'
test
tes
te
t

This gives us the first portion, almost. The 5-train outside of that is ([: }: ([: |. ]\@[)), which applies }: (betail, remove last element) to the above expression:
   'testing' ([: }: [: |. ]\@]) 'test'
test
tes
te

(This is because we can't have a duplicate midpoint.)
The outer part is finally:
]\@] ,~ ([: }: ([: |. ]\@[))

This is composed of ]\@] (prefixes of left argument) and ,~ (append what's to the left with what's to the right), leaving us with the desired result:
   'testing' (]\@] ,~ ([: }: ([: |. ]\@[))) 'test'
testing
testin
testi
test
tes
te
t
te
tes
test

Test cases
   k =: ]\@] ,~ ([: }: ([: |. ]\@[))
   'o' k 'o'
o
   k~ 'o'
o
   'test' k 'test'
test
tes
te
t
te
tes
test
   k~ 'test'
test
tes
te
t
te
tes
test
   '. . .' k '...'
. . .
. .
. .
.
.
..
...
   'z' k 'zz'
z
zz

You can rearrange it to 14 bytes using (,~}:@|.)&(]\)

C, 111 bytes
f(char*a, char*b){int l=strlen(a),k=1;while(*a){printf("%s\n",a);a[--l]=0;}while(b[k]) printf("%.*s\n",++k,b);}

Ungolfed test
#include <stdio.h>
#include <string.h>

f(char*a, char*b) {
  int l=strlen(a), k=1;
  while(*a) {
    printf("%s\n",a);
    a[--l]=0;
  }
  while(b[k])
    printf("%.*s\n",++k,b);
}

int main() {
  char a[10] = {0};
  char b[10] = {0};

  for (int i=0; i<5; ++i) {
    a[i] = 'a' + i;
    b[i] = 'a' + i*2;
  }

  f(&(a[0]), &(b[0]));
}

Python, 88 bytes (function) (92 for lambda) (beginner)
As lambda-function (92 bytes):
f=lambda A,B:"\n".join([(A+" ")[:-i]for i in range(len(A))]+[B[:i+1]for i in range(len(B))])

As function:
def f(a,b,c=""):
 while a!=b[0]and a:print(a);a=a[:-1]
 while b:c+=b[0];b=b[1:];print(c)

In code:  or 72 bytes (from 93 bytes)
Shall 'a' be the word to decrease an 'b' be the word to raise up to, this should do:
for i in range(len(a)+(a[0]!=b[0])):print((a+"_")[:-i])
for k in range(len(b)):print(b[:k+1])

or with 72 chars
c=""
while a!=b[0]and a:print(a);a=a[:-1]
while b:c+=b[0];b=b[1:];print(c)

Apart from the lambda-version my solutions will work even with the strings starting differently (overread that part o.0 )

You can't assume the input is in a variable.

So it must be a function? @daHugLenny

Either take input by STDIN (input()/raw_input()) or by function arguments. Also, instead of chars, count the length in bytes.

pretty sure some people here count chars and claim bytes, but ok. Thanks @daHugLenny

JavaScript (ES6), 92 bytes
(s,t)=>s.replace(/./g,`
$\`$&`).split`
`.slice(2).reverse().join`
`+t.replace(/./g,`
$\`$&`)

The replace statements build up a triangle of strings, which is exactly what's required for the second half of the output, however the first half needs to be reversed and the duplicate single-character line removed. Note: outputs a leading newline if the first string is a single character. If this is undesirable then for an extra byte this version always outputs a trailing newline:
(s,t)=>s.replace(/./g,`
$\`$&\n`).split(/^/m).slice(1).reverse().join``+t.replace(/./g,`
$\`$&\n`)

C, 142 bytes
#define _(x,y) while(y)printf("%.*s\n",d,x-c);
f(char*a,char*b){int c=1,d=strlen(a)+1;while(*++a==*++b)c++;_(a,--d>=c)d++;_(b,d++<strlen(b-c))}

Provide f(char* str1, char* str2).

137 bytes

TI-Basic, 56 bytes
Prompt Str1,Str2
Str1
While 1<length(Ans
Disp Ans
sub(Ans,1,length(Ans)-1
End
For(I,1,length(Str2
Disp sub(Str2,1,I
End

Example usage
Str1=?Test
Str2=?Testing
Test
Tes
Te
T
Te
Tes
Test
Testi
Testin
Testing

Str1=?O
Str2=?O
O

Str1=?z
Str2=?zz
z
zz

brainfuck, 162 bytes
,[>,]++++++++++[[-<]>[->]<]++++++++++[<[+<]<[+<]>[+>]>[+>]<---]<[<]<[<]>[[.>]++++++++++.----------<[-]<[[->+<]<]>>]>[<+>-]>[[<+>-]<[<]>[.>]++++++++++.---------->]

Try it here
Input takes the two strings separated by a linefeed.
First program with brianfuck and first code golf so I'm sure there is plenty of optimization to be done.  Had fun doing it though.
Ungolfed
,[>,] Read all input
++++++++++ Flag for 10
[                   Subtract 10 from each cell to flag space for blank
    [-<]
    >
        [->]
        <
]
++++++++++ Flag for 10
[                   Add 10 back to each cell with value in it
    <[+<]<[+<]
    >[+>]>[+>]<---
]
<[<]<[<]>               goto first cell in first string string

[                           Print first word subtracting one each time
    [.>]                    Print first string
    ++++++++++.----------   Print new line
    <[-]                    Kill last letter of first string
    <                       Back one
    [                       Move each first string character up one
          [->+<]
          <
    ]>>
]
>[<+>-]>                    Move to first letter of scond string back one goto second letter
[
    [<+>-]                  Move next letter back
    <[<]>                   Move to start of string
    [.>]                    Print string
    ++++++++++.----------   Print new line
    >
]

Welcome to PPCG! Impressive first post!

Python 2, 76 bytes
lambda s,t:'\n'.join(g(s)[:-1]+g(t)[::-1])
g=lambda s:s and[s]+g(s[:-1])or[]

Try it online!

Vyxal j, 45 bitsv2, 5.625 bytes
¦Ṙ?¦ḢJ

Try it Online!
Explained
¦Ṙ?¦ḢJ
¦Ṙ      # [prefixes of the first string] reversed
  ?¦Ḣ   # [prefixes of the second string] with the first prefix removed
     J  # Merged into a single list
# Joined on newlines by the j flag

Created with the help of Luminespire.

Alice, 29 bytes
/OM!w@On;?$!?/
KMd!h.$t..wKh\

Try it online!
/MM!w.Ot;.$K?h!w?.n$@h!dOK    Full program untangled
/MM                           Puts the two arguments as strings on the stack
   !                          Pops the second string and save it on the tape
    w    .$K                  While the string still have characters
     .O                       Print the string
       t;                     Remove the last character from the string
                              First string done, now second one
                              As the first letter is the same:
            ?                 Get the string from the tape
             h!               Keep the first character on the stack, save the rest on the tape
               w?.n$@    K    While there are still characters to read on the tape
                     h!       Get the first character, put the rest on the tape
                       dO     Join the stack into a new string and print it

Raku (Perl 6) (rakudo), 56 bytes
{join "\n",reverse([\~] $^a.comb),([\~] $^b.comb)[1..*]}

Attempt This Online!

PowerShell v2+, 99 bytes
param($a,$b)if($a-eq$b){$a;exit}$a.length..1|%{-join$a[0..--$_]};1..($b.length-1)|%{-join$b[0..$_]}

Straightforward. Loops downward through the first string $a, then loops upward through the second string $b. Has some additional logic at the start where if the strings are equal, so that it only outputs once then exits. The loop indices are off from each other to account for fenceposting.

I guess I can beat a few with Groovy here...
Groovy (96 Bytes)
def x(a,b,c){(a..b).each{println c.substring(0,it)}};{y,z->x(y.length(),1,y);x(1,z.length(),z);}

Try it:
https://groovyconsole.appspot.com/script/5190971159478272
Explanation:

X is a closure to print the substring from 0 to x from (a to b) for all integers from a to b.
The second closure passes the first word from it's length to 1 then does the second word in reverse order.

JavaScript (ES6), 75 bytes
f=(x,y,n=1)=>x||n++<y.length?(x||y.slice(0,n))+`
`+f(x.slice(0,-1),y,n):''

Explanation
f=(x,y,n=1)=>               //Take 2 inputs, initialize n to 1.
  x||n++<y.length?          //Increment n only if x doesn't have a value (short circuit).
  (x||y.slice(0,n))+`       //If x has a value, return it; otherwise, return y sliced.
  `+f(x.slice(0,-1),y,n):'' //Recurse, removing last char of x. No problem if x is empty.

Snippet

f=(x,y,n=1)=>x||n++<y.length?(x||y.slice(0,n))+`
`+f(x.slice(0,-1),y,n):''

console.log(f('Test','Testing'));
console.log(f('O','O'));
console.log(f('z','zz'));
console.log(f("0123456789", "02468"));

Ruby, 63 bytes
->a,b{f=->s{(1..s.size).map{|l|s[0,l]}};puts f[a].reverse+f[b]}

It's an anonymous function taking two strings:
$ irb
2.3.0 :001 > ->a,b{f=->s{(1..s.size).map{|l|s[0,l]}};puts f[a].reverse+f[b]}["hey","you"]
hey
he
h
y
yo
you

Gura, 115 bytes
t(a,b)={c=a.len()-1;for(i in 0..c){print(a[0..(c-i)]);println();}for(i in 1..b.len()-1){print(b[0..i]);println();}}

Just discovered this language on Github, it's pretty good !

JavaScript (Node.js), 94 92 bytes
(x,y)=>[x,y].map(z=>[...z].map(e=>z.substr(0,Math.abs(i--)||--i)).join`
`,i=x.length).join``

Try it online!

Powershell, 88 bytes
param($a,$b)@()+($a.Length..1|%{-join$a[0..--$_]})+(2..$b.Length|%{-join$b[0..--$_]})|gu

Ungolfed test script:
$f = {

param($a,$b)
@()+
($a.Length..1|%{-join$a[0..--$_]})+
(1..$b.Length|%{-join$b[0..--$_]})|
gu

}

@(
    ,('O', 'O', 'O')
    ,('Test', 'Testing', 'Test Tes Te T Te Tes Test Testi Testin Testing')
    ,('Hello!', 'Hi.', 'Hello! Hello Hell Hel He H Hi Hi.')
    ,('z', 'zz', 'z zz')
    ,('.vimrc', '.minecraft', '.vimrc .vimr .vim .vi .v . .m .mi .min .mine .minec .minecr .minecra .minecraf .minecraft')
) | % {
    $a, $b, $e = $_
    $r = &$f $a $b
    "$r"-eq"$e"
    $r
    ''
}

Test script output:
True
O

True
Test
Tes
Te
T
Te
Tes
Test
Testi
Testin
Testing

True
Hello!
Hello
Hell
Hel
He
H
Hi
Hi.

True
z
zz

True
.vimrc
.vimr
.vim
.vi
.v
.
.m
.mi
.min
.mine
.minec
.minecr
.minecra
.minecraf
.minecraft

Expalantion:
The sum of arrays puts by pipes to gu (alias for Get-Unique). The gu eliminates double strings.

Forth (gforth), 65 bytes
: f dup 1 do 2dup cr type 1- loop 2drop 1 do dup cr i type loop ;

Try it online!
Takes arguments in order on the stack (will look like reverse order in code)
Explanation
Loops from  1 to string1-length outputting the increasingly smaller string each time. Then loops from 1 to string2-length + 1, outputting the increasingly larger string each time
Code Explanation
: f                    \ begin word definition
  dup 1 do             \ duplicate the string length, then loop from 1 to string-length
    2dup               \ duplicate string address and length
    cr type            \ output a newline, then print the word to the given length
    1-                 \ subtract 1 from string length
  loop                 \ end the loop
  2drop                \ drop address and string length of first string
  1 do                 \ loop from 1 to string2-length
    dup                \ duplicate string address
    cr i type          \ output a new line then print the first i characters of the string
  loop                 \ end the loop
;                      \ end the string definition

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Dimensional countdown
Write a function f(n,k) that displays the k-dimensional countdown from n.
A 1-dimensional countdown from 5 looks like
 54321

A 2-dimensional countdown from 5 looks like
 54321
 4321
 321
 21
 1

Finally, a 3-dimensional countdown from 5 looks like
 54321
 4321
 321
 21
 1
 4321
 321
 21
 1
 321
 21
 1
 21
 1
 1

Formal definition
The 1-dimensional countdown from any n is a single line with the digits n, n-1,...,1 concatenated (followed by a newline).
For any k, the k-dimensional countdown from 1 is the single line
 1

For n > 1 and k > 1, a k-dimensional countdown from n is a (k-1)-dimensional countdown from n followed by a k-dimensional countdown from n-1.
Input
Two positive integers k and n <= 9, in any format you choose.
Output
The k-dimensional countdown from n, with a newline after each 1-dimensional countdown. Extra newlines are permitted in the output.
Scoring
Standard golf scoring.
Bonus example
Here's an example with k > n, a 4-dimensional countdown from 3 (with extra comments that are not to be included in actual solutions):
 -- 3-dimensional countdown from 3
 321
 21
 1
 21
 1
 1
 -- 4-dimensional countdown from 2:
 ---- 3-dimensional countdown from 2:
 21
 1
 1
 ---- 4-dimensional countdown from 1:
 1

Clarifications:
Digits on a line do not need to be adjacent, but they must be evenly-spaced.
You may write a full program instead of just a function, if you prefer.

I'm not sure I understand the test cases correctly. Are the 3D and 4D countdowns from 2 identical?

@Dennis I think the intention is that 4D countdown from 2 = 3D countdown from 2 + 4D countdown from 1

shouldn't it say 3d countdown from one?

Extra newlines are permitted in the output. Does that refer to trailing newlines or can they occur anywhere?

@Dennis Extra newlines can occur anywhere. Well, 543\n21 isn't okay, but after any '1' they're okay.

Python, 60 bytes
f=lambda n,k:n>1<k and f(n,k-1)+f(n-1,k)or'987654321\n'[~n:]

Test it on Ideone.
How it works
The k-dimensional countdown from n can be defined with a single base case:

If n = 1 or k = 1, the output is n || n-1 || ... || 1 || ¶, where || indicates concatenation.

Using the recursive definition from the question, f(n,k) returns f(n,k-1)+f(n-1,k) if n > 1 and k > 1; otherwise it returns the last n + 1 characters from '987654321\n'.

Dennis is just too good. How did you do it though?

My only insight here was that you can combine both base cases. The rest is just a direct translation of the recursive definition.

Jelly, 8 bytes
R¡UḌFṚp⁷

This is a full program that expects n and k as command-line arguments.
Try it online!
How it works
R¡UḌFṚp⁷  Main link. Left argument: n. Right argument: k

 ¡        Repeat the link to the left k times.
R           Range; map each integer j in the previous return value to [1, ..., j].
  U       Upend; reverse each 1-dimensional array in the result.
   Ḍ      Undecimal; convert each 1-dimensional array from base 10 to integer.
    F     Flatten the resulting array.
     Ṛ    Reverse the result.
      p⁷  Cartesian product with '\n'. (Join is weird for singleton arrays.)

Doesn't Y work in place of p⁷?

Sort of. For 5, 1, it displays [54321].

Javascript, 40 38 37 bytes
Saved 1 bytes thanks to @edc65:
f=(n,k)=>k*n?f(n,k-1)+f(n-1,k):n||`
`

Previous answers
38 bytes thanks to @Neil:
f=(n,k)=>k&&n?f(n,k-1)+f(n-1,k):n||`
`

40 bytes:
f=(n,k)=>k&&n?f(n,k-1)+f(n-1,k):n?n:'\n'

Save one byte by using || instead of ?n:. Save another byte by using a literal newline inside \``s instead of '\n'`.

Best I could do without the extra newlines was 43: f=(n,k)=>n?(k?f(n,k-1):n)+f(n-1,k):k?\`:`\n``

@Neil I'm using notepad++ to count bytes and the literal newline count as 2 char.

Maybe you could try it in your browser scratchpad instead?

Clever, +1. But use * instead &&.

I was originally planning to work out a JS submission, but I can't beat this (and I learned a couple of things). Nice work.

@edc65 It's fixed

Python, 86 81 80 bytes
o=lambda d,n:"987654321"[-n:]if d<2else"\n".join([o(d-1,n-x) for x in range(n)])

d is the number of dimensions, n is the countdown number.
Will post an explanation soon.
EDIT #1: Changed it to lambda.
EDIT #2: Saved 1 byte thanks to @DestructibleWatermelon.

Python, 76 75 bytes
-1 byte thanks to @Sp3000
c=lambda n,k:k>1and'\n'.join(c(n-i,k-1)for i in range(n))or'987654321'[-n:]

Caries out the procedure as described in the OP: joins the decreasing n results for k-1 on newlines with a base of the recursion of the 'n...1' string when k is 1 (k not greater than 1 since we are guaranteed positive k input).
Test cases on ideone

Haskell, 57 bytes
n#1='\n':(show=<<[n,n-1..1])
1#_=1#1
n#k=n#(k-1)++(n-1)#k

Usage example: 5 # 3 -> "\n54321\n4321\n321\n21\n1\n4321\n321\n21\n1\n321\n21\n1\n21\n1\n1".
A direct implementation of the definition.

Dyalog APL, 18 bytes
Prompts for n, then for k.
~∘'0'⍤1⍕(⌽⍳)⍤0⍣⎕⊢⎕

~∘'0'⍤1 remove (~) the (∘) zeros ('0') from the rows (⍤1) (padding with spaces as needed) of
⍕ the character representation of
(⌽⍳)⍤0⍣⎕ the reversed (⌽) count until (⍳) each scalar (⍤0), repeated (⍣) input (⎕) times
⊢ on
⎕ numeric input
TryAPL online!

Racket 215 bytes
(define(g n k(s(number->string n)))(cond [(< k 2) n]
[else(define o(for/list((i(string-length s)))
(string->number(substring s i))))(for/list((x o))(g x(- k 1)))]))
(define(f n k)(for-each println(flatten(g n k))))

Testing:
(f 54321 3)

54321
4321
321
21
1
4321
321
21
1
321
21
1
21
1
1

Umm... On 3D mode, why does 54321 appear twice?

I  am trying to sort out the issues.

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ The problem has been corrected.

Cool, and I also see you removed lots of whitespace!

In Racket, using lambda (λ) is always less bytes than using define. Also, the input for n was specified to be a number for which you build the (range 1 n).  See also about replacing your cond with an if, since you save bytes on the else.

I find let and lambda more complex than define. Also, define does not work in "if" expression. I am trying to put these into effect.

J, 38 37 32 bytes
a:":@>@-.~&,0<@-."1~0&(](-i.)"0)

This is a function that takes k on the LHS and n on the RHS.
Saved 5 bytes with ideas from @Adám.
Usage
   f =: a:":@>@-.~&,0<@-."1~0&(](-i.)"0)
   3 f 5
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
4 3 2 1
3 2 1
2 1
1
3 2 1
2 1
1
2 1
1
1

Explanation
a:":@>@-.~&,0<@-."1~0&(](-i.)"0)  Input: k on LHS, n on RHS
                    0&(        )  Repeat k times on initial value n
                        (   )"0   For each value x
                          i.        Make the range [0, x)
                         -          Subtract x from each to make the range [x, 1]
                       ]            Return the array of ranges
            0  -."1~              Remove the zeros from each row
             <@                   Box each row
          &,                      Flatten the array of boxes
a:     -.~                        Remove the empty boxes
     >@                           Unbox each
  ":@                             Convert it into a string and return

You should be able to use my approach.

@Adám Thanks, I'll try it out

C 93 Bytes
Iterative implementation.
m,i,j;f(n,k){for(;m<k+2;m++)for(j=0;j<n;j++){for(i=m;i<n-j;i++)printf("%d",n-j-i);puts("");}}

C 67 65 61 56 52 Bytes
Recursive implementation
f(n,k){n*k?f(n,k-1)+f(n-1,k):puts("987654321"+9-n);}

You can't declare strings without using char *, so your recursive implementation doesn't compile. But the solution is very easy and saves 4 bytes: just replace m inside the puts() call with "987654321".

I compiled using gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125).  I think it's ok since I'm just converting from char* to int, however, since your solution is 4 bytes smaller I like it better.  Thanks

Ruby, 56 bytes
f=->n,k{n>1&&k>1?[f[n,k-1],f[n-1,k]]:[*1..n].reverse*""}

Usage
When you display any solutions, you should use "Kernel#puts".
Example:
puts f[9,3]

Batch, 117 bytes
@setlocal
@set/an=%1-1,k=%2-1,p=n*k,s=987654321
@if %p%==0 (call echo %%s:~-%1%%)else call %0 %1 %k%&call %0 %n% %2

Port of Dennis♦'s Python answer.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Hexplosive ASCII-art challenge
In the strategy game "Hexplode", players take turns placing tokens on a hexagonal board. Once the number of tokens equals the number of adjacent tiles, that tile hexplodes, and moves all of the tokes on it to the surrounding neighbors. You can play the game online here.
I like this game, but sometimes it's hard to know exactly how many tokens go on a specific tile; I'm always counting the number of neighbors. It would really convenient if I had an ASCII-art to help me remember how many tokens go on each tile.
You need to write a program or function that takes a positive integer as input, and produces this ASCII representation of hexagon of size N. Each tile will be the number of neighbors that tile has. Since 1 is a weird corner case with zero neighbors, you only have to handle inputs larger than 1.
You may take this number in any reasonable format, such as STDIN, function arguments, command-line arguments, from a file, etc. The output may also be in any reasonable format, such as printing to STDOUT, writing to a file, returning a list of strings, a newline separated string, etc.
Here is some sample output for the first 5 inputs:
2)

 3 3
3 6 3
 3 3

3)

  3 4 3
 4 6 6 4
3 6 6 6 3
 4 6 6 4
  3 4 3

4)

   3 4 4 3
  4 6 6 6 4
 4 6 6 6 6 4
3 6 6 6 6 6 3
 4 6 6 6 6 4
  4 6 6 6 4
   3 4 4 3

5)

    3 4 4 4 3
   4 6 6 6 6 4
  4 6 6 6 6 6 4
 4 6 6 6 6 6 6 4
3 6 6 6 6 6 6 6 3
 4 6 6 6 6 6 6 4
  4 6 6 6 6 6 4
   4 6 6 6 6 4
    3 4 4 4 3

6)

     3 4 4 4 4 3
    4 6 6 6 6 6 4
   4 6 6 6 6 6 6 4
  4 6 6 6 6 6 6 6 4
 4 6 6 6 6 6 6 6 6 4
3 6 6 6 6 6 6 6 6 6 3
 4 6 6 6 6 6 6 6 6 4
  4 6 6 6 6 6 6 6 4
   4 6 6 6 6 6 6 4
    4 6 6 6 6 6 4
     3 4 4 4 4 3

And the pattern continues in a similar manner. As usual, standard loopholes apply, and the answer with the lowest byte-count will be crowned the winner!
Leaderboards
Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
# Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
# Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
# Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the leaderboard snippet:
# [><>](http://esolangs.org/wiki/Fish), 121 bytes

var QUESTION_ID=92194,OVERRIDE_USER=31716;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Related (but asking about the process rather than the number of neighbours).

I'm tempted to learn Hexagony just for the sake of this challenge. ;)

MATL, 39 37 bytes
4*3-:!G:+o~YRtP*!tPw4LY)vtI5&lZ+47+*c

Try it online! Or verify all test cases.
Explanation
I get to use convolution again!
Consider input n = 3. The code first builds a matrix of size 4*n-3×n by adding the column vector [1; 2; ...; 9] to the row vector [1, 2, 3] with broadcast. This means computing a 2D array array of all pairwise additions:
 2  3  4
 3  4  5
 4  5  6
 5  6  7
 6  7  8
 7  8  9
 8  9 10
 9 10 11
10 11 12

Replacing even numbers by 1 and odd numbers by 0 gives the checkerboard pattern
1 0 1
0 1 0
1 0 1
0 1 0
1 0 1
0 1 0
1 0 1
0 1 0
1 0 1

This will be used for generating (part of) the hexagonal grid. Ones will represent points in the grid, and zeros will represent spaces.
The upper-right corner is removed by zeroing out all entries above the main "diagonal" of the matrix:
1 0 0
0 1 0
1 0 1
0 1 0
1 0 1
0 1 0
1 0 1
0 1 0
1 0 1

Element-wise multiplying this matrix by a vertically flipped version of itself removes the lower-right corner as well. Transposing then gives
1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 1 0 0

This begins to look like a hexagon. Using symmetry, the grid is extended to produce the upper half:
0 0 1 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 1 0 0

Now we need to replace each entry equal to one by the number of neighbours. For this we use convolution with a 3×5 neighbourhood (that is, the kernel is a 3×5 matrix of ones). The result,
2 3 4 5 5 5 4 3 2
4 5 7 7 8 7 7 5 4
4 6 7 8 7 8 7 6 4
4 5 7 7 8 7 7 5 4
2 3 4 5 5 5 4 3 2

has two issues (which will be solved later):

The values have been computed for all positions, whereas we only need them at the positions of the ones in the zero-one grid.
For each of those positions, the neighbour count includes the point itself, so it is off by 1.

The code now adds 47 to each computed value. This corresponds to subtracting 1 to solve issue (2) and adding 48 (ASCII for '0'), which converts each number to the code point of its corresponding char.
The resulting matrix is then multiplied by a copy of the zero-one grid. This solves issue (1) above, making the points that are not part of the hexagonal grid equal to zero again:
 0  0 51  0 52  0 51  0  0
 0 52  0 54  0 54  0 52  0
51  0 54  0 54  0 54  0 51
 0 52  0 54  0 54  0 52  0
 0  0 51  0 52  0 51  0  0

Finally, this array of numbers is cast to a char array. Zero chars are displayed as space, which gives the final result:
  3 4 3
 4 6 6 4
3 6 6 6 3
 4 6 6 4
  3 4 3

JavaScript (ES6), 118 117 bytes
n=>[...Array(m=n+--n)].map((_,i,a)=>a.map((_,j)=>(k=j-(i>n?i-n:n-i))<0?``:k&&++j<m?i/2%n?6:4:3+!i%n).join` `).join`\n`

Where \n represents a literal newline character. Explanation: Suppose n=4. We start with the following space-separated digit square:
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

The first |n-i| 0s are deleted, but the spaces remain:
   0 0 0 0
  0 0 0 0 0
 0 0 0 0 0 0
0 0 0 0 0 0 0
 0 0 0 0 0 0
  0 0 0 0 0
   0 0 0 0

Instant hexagon! It then suffices to calculate the appropriate value in place of each 0 by checking whether we're on the first or last row and/or column. Edit: Saved 1 byte thanks to @Arnauld.

Using some of your formula, I came to a 107 bytes version with for / console.log(): n=>{for(i=n+--n;i--;)console.log(' '.repeat(l=i>n?i-n:n-i)+(j=3+!l%n)+\ ${l-n?6:4}`.repeat(2*n-l-1)+' '+j)}`

@Arnauld I like that 3+!i%n!

Python 2, 125 123 bytes
def h(n):m=n-1;t=[' '*(m-r)+' '.join(('46'[r>0]*(r+m-1)).join('34'[r%m>0]*2))for r in range(n)];print'\n'.join(t+t[-2::-1])

Tests are on ideone
Runs through the top to the middle rows, for r in range(n), constructing strings:
- making two corners or two edges, '34'[r%m>0]*2;
- filling by joining them with repeated '6' or '4', '46'[r>0]*(r+m-1);
- joining the corners and edges with ' ';
- prepending with spaces, ' '*(m-r);
Then prints this and it's reflection in the middle row joined by new lines, print'\n'.join(t+t[-2::-1])

Python 2, 96 bytes
n=input();m=n-1
while n+m:n-=1;j=abs(n);c='34'[0<j<m];print' '*j+c+' '+'46  '[j<m::2]*(2*m+~j)+c

This looks pretty messy and somewhat golfable...

Java, 375 363 361 339 329 317 293 bytes
interface J{static void main(String[]r){int i=0,k,h=Integer.decode(r[0]),a=1,l,n=0;for(;i++<h*2-1;n+=a){if(n==h-1)a=-1;String s="";for(k=0;k<n+h;k++,s+=" ")s+=n==0?k==0||k==n+h-1?3:4:k!=0&&k!=n+h-1?6:n==h-1?3:4;l=(h*4-3-s.trim().length())/2;System.out.printf((l==0?"%":"%"+l)+"s%s\n","",s);}}}

Ungolfed
interface J {
    static void main(String[] r) {
        int i = 0, k, h = Integer.decode(r[0]), a = 1, l, n = 0;
        for (; i++ < h * 2 - 1; n += a) {
            if (n == h - 1) {
                a = -1;
            }
            String s = "";
            for (k = 0; k < n + h; k++, s += " ") {
                s += n == 0 ? k == 0 || k == n + h - 1 ? 3 : 4 : k != 0 && k != n + h - 1 ? 6 : n == h - 1 ? 3 : 4;
            }
            l = (h * 4 - 3 - s.trim().length()) / 2;
            System.out.printf((l == 0 ? "%" : "%" + l) + "s%s\n", "", s);
        }
    }
}

Usage:
$ java J 5
    3 4 4 4 3
   4 6 6 6 6 4
  4 6 6 6 6 6 4
 4 6 6 6 6 6 6 4
3 6 6 6 6 6 6 6 3
 4 6 6 6 6 6 6 4
  4 6 6 6 6 6 4
   4 6 6 6 6 4
    3 4 4 4 3

I am sure that the horrible nested if-else block can be rewritten to be smaller but I can't figure it out at the moment. Any suggestions are welcome :-)
Update

Followed Kevin Cruijssen's suggestion and used decode instead of parseInt.
Rewrote some ifs by using the ternary operator.
More ternary operators.
Moar ternary operators! I think I have created a monster!
Rewrote the if-else block regarding the printing.

I haven't looked that closely at the method you use itself, but some small golfing tips for your current code: Integer.parseInt can be golfed to Integer.decode. l=(h*4-3-s.trim().length())/2;if(l==0) can be golfed to if((l=(h*4-3-s.trim().length())/2)==0). Also, it's completely acceptable to just post a method without class (unless the question states otherwise), so void f(int i){...use i...} instead of interface J{static void main(String[]r){...i=Integer.decode(r[0])...use i...}, that should save you quite a few bytes as well. When I have more time I'll look further.

@KevinCruijssen: Thank you for your suggestions. l=(h*4-3-s.trim().length())/2;if(l==0) is actually the same length with if((l=(h*4-3-s.trim().length())/2)==0).

05AB1E, 44 bytes
FN_i4ë6}ð«¹ÍN+×ðìN_N¹<Q~i3ë4}.ø¹<N-ð×ì})Â¦«»

Explanation
As the top and bottom of the hexagon are mirrored we only need to generate the upper part.
So for an input of X we need to generate X rows. That is what the main loop does.
F                                        }

Then we do the center part of the rows.
This is 4 for the first row and 6 for the rest (as we're only doing the upper part).
We concatenate this number with a space as the pattern will require spacing between numbers.
N_i4ë6}ð«

We then repeat this string X-2+N times, where N is the current row 0-indexed and prepend a space character on the left side.
¹ÍN+×ðì

After this it's time for the corners. They will be 3 for the first and last row and 4 for the middle rows.
N_N¹<Q~i3ë4}.ø

Now we need to make sure the rows are lined up correctly by adding spaces to the front of each row. The number of spaces added will be X-1-N.
¹<N-ð×ì

Now that we have the upper part of the grid done, we add the rows to a list, create a reversed copy and remove the first item from that copy (as we only need the central row once), then merge these 2 lists together and print.
)Â¦«»

Try it online!
Additional solution, also 44 bytes:
ÍÅ10.øvN_i4ë6}ð«¹ÍN+×ðìyi4ë3}.ø¹<N-ð×ì})Â¦«»

Ruby, 87 bytes
Anonymous function takes n as argument and returns an array of strings.
->n{(1-n..n-=1).map{|i|j=i.abs
" "*j+(e=j%n>0?"4 ":"3 ")+["6 ","4 "][j/n]*(2*n-1-j)+e}}

Ungolfed in test program
Input through stdin. Writes the whole shape to stdout.
Pretty self explanatory.
f=->n{
  (1-n..n-=1).map{|i|            #reduce n by 1 and iterate i from -n to n
    j=i.abs;                     #absolute magnitude of i
    " "*j+                       #j spaces +
    (e=j%n>0?"4 ":"3 ")+         #start the string with 3 or 4 +
    ["6 ","4 "][j/n]*(2*n-1-j)+  #2*n-1-j 6's or 4`s as appropriate +
    e                            #end the string with another 3 or 4
  }
}

puts f[gets.to_i]

V, 60 bytes
Àé x@aA4 xr3^.òhYpXa 6^òkyHç^/:m0
Pç 3.*6/^r4$.
òÍ6 4./6

Try it online!
This is really way too long. Here is a hexdump, since this contains unprintable characters:
0000000: c0e9 2078 4061 4134 201b 7872 335e 2ef2  .. x@aA4 .xr3^..
0000010: 6859 7058 6120 361b 5ef2 6b79 48e7 5e2f  hYpXa 6.^.kyH.^/
0000020: 3a6d 300a 50e7 2033 2e2a 362f 5e72 3424  :m0.P. 3.*6/^r4$
0000030: 2e0a f2cd 3620 9334 852e 2f36            ....6 .4../6

Racket, 487 bytes
(λ(n c e o)(let((sp(append(range(- n 1)-1 -1)(reverse(range(- n 1)0 -1))))
(mm(append(range(- n 2)(-(+ n(- n 1))2))(range(-(+ n(- n 1))2)(-(- n 1)2)-1)))
(r""))(for((i sp)(j mm))(define str"")(for((ss i))(set! str(string-append str" ")))
(set! str(string-append str(if(or(= i 0)(= i(- n 1))(= i(* 2(- n 1))))c e)" "))
(for((jj j))(set! str(string-append str(if(= j(- n 2))e o)" ")))(set! r(if(or(= i 0)
(= i(- n 1))(= i(* 2(- n 1))))c e))(set! str(string-append str r))(displayln str))))

Testing:
(f 4 "3" "4" "6")

   3 4 4 3
  4 6 6 6 4
 4 6 6 6 6 4
3 6 6 6 6 6 3
 4 6 6 6 6 4
  4 6 6 6 4
   3 4 4 3

(f 5 "o" "*" "-")

    o * * * o
   * - - - - *
  * - - - - - *
 * - - - - - - *
o - - - - - - - o
 * - - - - - - *
  * - - - - - *
   * - - - - *
    o * * * o

Detailed version:
(define(f1 n c e o)
  (let ((sp(append(range(sub1 n) -1 -1)
                  (reverse(range(sub1 n) 0 -1))))
        (mm(append(range(- n 2)(-(+ n(sub1 n)) 2))
                  (range(-(+ n(sub1 n)) 2)(-(sub1 n)2) -1) ))
        (r ""))
    (for((i sp)(j mm))
      (define str "")
      (for((ss i))(set! str(string-append str " ")))
      (set! str(string-append str
                              (if(or(= i 0)(= i(sub1 n))
                                    (= i(* 2(sub1 n)))) c e)
                              " "))
      (for((jj j))
        (set! str(string-append str
                                (if(= j(- n 2)) e o)
                                " ")))
      (set! r(if(or(= i 0)
                   (= i(sub1 n))
                   (= i(* 2(sub1 n)))) c e))
      (set! str(string-append str r))
      (displayln str))))


text:
Products of Consecutive Primes
As of time of submission to the sandbox, I had 17017 reputation, which you will all be able to factorise as 7×11×13×17, a product of 4 consecutive primes.
Please write a function or program to output all the products of two or more consecutive primes up to an input integer n. For example, given n=143 you should output 6, 15, 30, 35, 77, 105, 143 (or equivalent output format).
Normal restrictions on I/O and loopholes apply.
This is code-golf, so the shortest program wins.

http://oeis.org/A097889

Should the output be sorted or not?

@Fatalize I had meant it to be sorted, but I see I didn't specify it well enough and there are already several answers which don't output a sorted list.

Jelly, 14 10 bytes
(no doubt there is golfing to do here! - yep...)
-4 bytes thanks to @Dennis - replace check for greater than n by using a range
ÆRẆP€ḟÆRfR

Note - this is both extremely inefficient and the results are unsorted.
Test it at TryItOnline
How?
ÆRẆP€ḟÆRfR - main link takes an argument, n
ÆR    ÆR   - primes up to n
  Ẇ        - all sublists
   P€      - product for each
     ḟ     - filter out the primes (since the sublists include those of lnegth 1)
        fR - filter out any not in range [1,N]
             (yep, it's calculating all products of primes up to n - gross)

You don't need µ and ³; >Ðḟ works just fine on its own. fR is even shorter.

@Dennis - I await your superior method. Thanks!

MATL, 25 20 bytes
Zq&Xf"@gnq?2MpG>~?6M

Approach similar to that in Jonathan Allan's answer.
Try it online!

Old version, 25 bytes
:YF!"@2<@sq0@0hhdz2=v?X@D

This obtains the exponents of prime factor decomposition for all numbers from 1 to the input. For each it checks:

If all exponents are less than 2.
If the sum of all exponents is greater than 1.
The array of exponents is extended with an additional zero on each end. The consecutive differences of the extended array are computed. There should be exactly 2 nonzero differences.

If the three conditions are fulfilled the number is displayed. Results are in incresing order.

Javascript (ES6), 105 104 bytes
n=>{for(i=1,P=[];i++<n;P[P.every(v=>i%v)?i:n]=i);P.map(i=>P.map(j=>j>i&&(p*=j)<=n&&console.log(p),p=i))}

Demo

var f =
n=>{for(i=1,P=[];i++<n;P[P.every(v=>i%v)?i:n]=i);P.map(i=>P.map(j=>j>i&&(p*=j)<=n&&console.log(p),p=i))}

f(143)

05AB1E, 17 15 bytes
L<ØŒ€PD¹>‹ÏDp_Ï

Explanation
L<Ø                 # get the first N primes, where N is the input
   Œ                # get all combinations of consecutive primes
    €P              # calculate the product of these sublists
      D¹>‹Ï         # keep only the products less than or equal to N
           Dp_Ï     # keep only those that aren't prime

Try it online!

Pyth, 18 bytes
f}PTftlY.:fP_YSQ)S

A program that takes input of an integer on STDIN and prints a list of integers.
Try it online
How it works
f}PTftlY.:fP_YSQ)S  Program. Input: Q
              SQ    Yield [1, 2, 3, ..., Q]
          fP_Y      Filter that by primality
        .:      )   Yield all sublists of that
    f               Filter the sublists by:
      lY             Length
     t               -1
                    removing sublists of length 1
f                S  Filter [1, 2, 3, ..., Q] (implicit input fill) by:
  PT                 Prime factorisation
 }                   is in the sublists
                    Implicitly print

Jelly, 11 bytes
ÆfÆCI=1Ȧµ€T

Not the shortest Jelly answer, but this approach is rather efficient and the output is sorted.
Try it online!
How it works
ÆfÆCI=1Ȧµ€T  Main link. Argument: n

        µ€   Map the preceding chain over each k in [1, ..., n].
Æf             Compute all prime factors of k, with multiplicities.
  ÆC           Count the number of primes less than or equal to each prime factor.
               This maps the j-th to j.
    I          Increments; compute the forward differences of consecutive indices.
     =1        Compare each difference with 1.
       Ȧ       All; return 1 iff the array is non-empty and has no zeroes.
          T  Truth; yield all indices for which the chain returned 1.