It's not inside a function, which means it has to be an initializer - which is assigned only when the item is declared - which means it must be a constant value at compile time, which malloc cannot be.
Move the line inside the main function and it'll work:
#include <stdio.h>
#include<stdlib.h>
struct Node{
int a;
int b;
}*a;
int main()
{
a=(struct Node*)malloc(sizeof(struct Node));
printf("Hello world");
return 0;
}